Skip to content

Commit

Permalink
Merge branch 'main' into bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dragomirp committed Apr 5, 2024
2 parents 8f7f9cb + ea0c729 commit 6755cb2
Show file tree
Hide file tree
Showing 12 changed files with 237 additions and 141 deletions.
10 changes: 10 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
github_checks:
annotations: false
coverage:
status:
project:
default:
target: 70%
patch:
default:
target: 33%
62 changes: 61 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": ["github>canonical/data-platform//renovate_presets/charm.json5"],
"reviewers": ["dragomirp", "marceloneppel", "taurus-forever"],
"reviewers": ["dragomirp", "lucasgameiroborges", "marceloneppel", "taurus-forever"],
"packageRules": [
// Later rules override earlier rules
{
Expand All @@ -10,6 +10,66 @@
}, {
"matchPackageNames": ["python"],
"allowedVersions": "<3.11"
},
{
"matchDepNames": ["Juju 2"],
"matchPackageNames": ["juju/juju"],
"allowedVersions": "<3.0.0",
"extractVersion": "^v(?<version>.*)$",
"groupName": "Juju 2"
},
{
"matchDepNames": ["Juju 3"],
"matchPackageNames": ["juju/juju"],
"allowedVersions": "<3.2.0",
"extractVersion": "^v(?<version>.*)$",
"groupName": "Juju 3"
},
{
"matchDepNames": ["libjuju 2"],
"matchPackageNames": ["juju"],
"matchManagers": ["regex"],
"matchDatasources": ["pypi"],
"versioning": "loose",
"allowedVersions": "<3",
"groupName": "Juju 2"
}
],
"regexManagers": [
{
"customType": "regex",
"fileMatch": ["^(workflow-templates|\\.github/workflows)/[^/]+\\.ya?ml$"],
"matchStrings": [
"(- agent: )(?<currentValue>.*?) +# renovate: latest juju 2"
],
"depNameTemplate": "Juju 2",
"packageNameTemplate": "juju/juju",
"datasourceTemplate": "github-releases",
"versioningTemplate": "loose",
"extractVersionTemplate": "Juju release"
},
{
"customType": "regex",
"fileMatch": ["^(workflow-templates|\\.github/workflows)/[^/]+\\.ya?ml$"],
"matchStrings": [
"(- agent: )(?<currentValue>.*?) +# renovate: latest juju 3"
],
"depNameTemplate": "Juju 3",
"packageNameTemplate": "juju/juju",
"datasourceTemplate": "github-releases",
"versioningTemplate": "loose",
"extractVersionTemplate": "Juju release"
},
{
"customType": "regex",
"fileMatch": ["^(workflow-templates|\\.github/workflows)/[^/]+\\.ya?ml$"],
"matchStrings": [
"(libjuju: )==(?<currentValue>.*?) +# renovate: latest libjuju 2"
],
"depNameTemplate": "libjuju 2",
"packageNameTemplate": "juju",
"datasourceTemplate": "pypi",
"versioningTemplate": "loose"
}
]
}
14 changes: 8 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ on:
jobs:
lint:
name: Lint
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v13.0.0
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v13.1.0

unit-test:
name: Unit test charm
Expand All @@ -37,10 +37,12 @@ jobs:
pipx install poetry
- name: Run tests
run: tox run -e unit
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v13.0.0
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v13.1.0
with:
cache: true

Expand All @@ -49,17 +51,17 @@ jobs:
fail-fast: false
matrix:
juju:
- agent: 2.9.46
libjuju: ^2
- agent: 2.9.47 # renovate: latest juju 2
libjuju: ==2.9.46.1 # renovate: latest libjuju 2
allure: false
- agent: 3.1.7
- agent: 3.1.7 # renovate: latest juju 3
allure: true
name: Integration test charm | ${{ matrix.juju.agent }}
needs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v13.0.0
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v13.1.0
with:
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
cloud: microk8s
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ jobs:

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v13.0.0
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v13.1.0

release:
name: Release charm
needs:
- ci-tests
- build
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v13.0.0
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v13.1.0
with:
channel: 1/edge
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_issue_to_jira.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
jobs:
sync:
name: Sync GitHub issue to Jira
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v13.0.0
uses: canonical/data-platform-workflows/.github/workflows/sync_issue_to_jira.yaml@v13.1.0
with:
jira-base-url: https://warthogs.atlassian.net
jira-project-key: DPE
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ build/
*.charm
.tox/
.coverage
coverage.xml
__pycache__/
*.py[cod]
*.log
Expand Down
12 changes: 6 additions & 6 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@

type: charm
bases:
- build-on:
- name: "ubuntu"
channel: "22.04"
run-on:
- name: "ubuntu"
channel: "22.04"
- name: ubuntu
channel: "22.04"
architectures: [amd64]
- name: ubuntu
channel: "22.04"
architectures: [arm64]

parts:
charm:
Expand Down
3 changes: 1 addition & 2 deletions metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ resources:
pgbouncer-image:
type: oci-image
description: OCI image for pgbouncer
# Rock version, using pgbouncer v1.18.
upstream-source: ghcr.io/canonical/charmed-postgresql@sha256:0cfc8cc4c096abdd713480d7cfa300e4edb15b59fc7db429a073a2c8179f5248
upstream-source: ghcr.io/canonical/charmed-postgresql@sha256:b7db85555240c4e6f2df51badba69d9d8255c6d1e41b37ccb3dd0efcaef59030

provides:
database:
Expand Down
Loading

0 comments on commit 6755cb2

Please sign in to comment.