Skip to content

Commit 20c0c09

Browse files
Use single (cached) build for tests & release (#558)
Use the same build for integration tests & release, so that we release what we tested Use charmcraftcache for the build Signed by Mykola & Jon: https://docs.google.com/document/d/1Wt0ds4dEcih4cvHWkbvvALtqonC_D9crcNQteX34SUg/edit
1 parent f5e3d9f commit 20c0c09

File tree

5 files changed

+27
-31
lines changed

5 files changed

+27
-31
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,18 @@ concurrency:
99
on:
1010
pull_request:
1111
schedule:
12-
- cron: '53 0 * * *' # Daily at 00:53 UTC
12+
- cron: '53 0 * * *' # Daily at 00:53 UTC
1313
# Triggered on push to branch "main" by .github/workflows/release.yaml
1414
workflow_call:
15+
outputs:
16+
artifact-prefix:
17+
description: build_charm.yaml `artifact-prefix` output
18+
value: ${{ jobs.build.outputs.artifact-prefix }}
1519

1620
jobs:
1721
lint:
1822
name: Lint
19-
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v26.0.0
23+
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v29.0.0
2024

2125
unit-test:
2226
name: Unit test charm
@@ -57,9 +61,8 @@ jobs:
5761

5862
build:
5963
name: Build charm
60-
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v26.0.0
64+
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v29.0.0
6165
with:
62-
cache: true
6366
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release
6467

6568
integration-test:
@@ -84,7 +87,7 @@ jobs:
8487
- lint
8588
- unit-test
8689
- build
87-
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v26.0.0
90+
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v29.0.0
8891
with:
8992
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
9093
architecture: ${{ matrix.architecture }}

.github/workflows/release.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,23 +35,16 @@ jobs:
3535
permissions:
3636
contents: write # Needed for Allure Report beta
3737

38-
build:
39-
name: Build charm
40-
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
41-
with:
42-
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release
43-
4438
release:
4539
name: Release charm
4640
needs:
4741
- lib-check
4842
- ci-tests
49-
- build
50-
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
43+
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
5144
with:
5245
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release
5346
channel: 8.0/edge
54-
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
47+
artifact-prefix: ${{ needs.ci-tests.outputs.artifact-prefix }}
5548
secrets:
5649
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}
5750
permissions:

.github/workflows/sync_docs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
sync-docs:
1212
name: Sync docs from Discourse
13-
uses: canonical/data-platform-workflows/.github/workflows/sync_docs.yaml@v26.0.0
13+
uses: canonical/data-platform-workflows/.github/workflows/sync_docs.yaml@v29.0.0
1414
with:
1515
reviewers: a-velasco
1616
permissions:

poetry.lock

Lines changed: 11 additions & 11 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ parameterized = "^0.9.0"
5151

5252
[tool.poetry.group.integration.dependencies]
5353
pytest = "^7.4.0"
54-
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/github_secrets"}
55-
pytest-microceph = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/microceph"}
54+
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/github_secrets"}
55+
pytest-microceph = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/microceph"}
5656
pytest-operator = "^0.28.0"
57-
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
58-
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
57+
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
58+
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
5959
juju = "^3.6.0.0"
6060
ops = "^2.15.0"
6161
mysql-connector-python = "~8.0.33"
@@ -66,7 +66,7 @@ urllib3 = "^1.26.16"
6666
lightkube = "^0.14.0"
6767
kubernetes = "^27.2.0"
6868
allure-pytest = "^2.13.2"
69-
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
69+
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
7070
pytest-asyncio = "^0.21.1"
7171

7272
[tool.coverage.run]

0 commit comments

Comments
 (0)