Skip to content

Commit 657b89f

Browse files
Use single (cached) build for tests & release (#366)
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 ae1aafc commit 657b89f

File tree

5 files changed

+20
-24
lines changed

5 files changed

+20
-24
lines changed

.github/workflows/ci.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,13 @@ 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:
@@ -65,9 +69,8 @@ jobs:
6569

6670
build:
6771
name: Build charm
68-
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v26.0.0
72+
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v29.0.0
6973
with:
70-
cache: true
7174
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release
7275

7376
integration-test:
@@ -92,7 +95,7 @@ jobs:
9295
- lint
9396
- unit-test
9497
- build
95-
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v26.0.0
98+
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v29.0.0
9699
with:
97100
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
98101
architecture: ${{ matrix.architecture }}

.github/workflows/release.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,15 @@ jobs:
1313
permissions:
1414
contents: write # Needed for Allure Report beta
1515

16-
build:
17-
name: Build charm
18-
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
19-
with:
20-
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release
21-
2216
release:
2317
name: Release charm
2418
needs:
2519
- ci-tests
26-
- build
27-
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
20+
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
2821
with:
2922
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release
3023
channel: 8.0/edge
31-
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
24+
artifact-prefix: ${{ needs.ci-tests.outputs.artifact-prefix }}
3225
secrets:
3326
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}
3427
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,izmalk
1616
permissions:

poetry.lock

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

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,14 +52,14 @@ ops = "^2.9.0"
5252
[tool.poetry.group.integration.dependencies]
5353
pytest = "^8.2.2"
5454
pytest-operator = "^0.35.0"
55-
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
56-
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
55+
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
56+
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
5757
juju = "^3.6.0.0"
5858
mysql-connector-python = "~8.0.33"
5959
pyyaml = "^6.0.1"
6060
tenacity = "^8.5.0"
6161
allure-pytest = "^2.13.5"
62-
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
62+
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
6363

6464
[tool.coverage.run]
6565
branch = true

0 commit comments

Comments
 (0)