Skip to content

Commit c20230b

Browse files
Use single (cached) build for tests & release (#825)
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 ec24388 commit c20230b

File tree

5 files changed

+24
-28
lines changed

5 files changed

+24
-28
lines changed

.github/workflows/ci.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,18 @@ on:
1616
- .github/renovate.json5
1717
- '.github/workflows/sync_docs.yaml'
1818
schedule:
19-
- cron: '53 0 * * *' # Daily at 00:53 UTC
19+
- cron: '53 0 * * *' # Daily at 00:53 UTC
2020
# Triggered on push to branch "main" by .github/workflows/release.yaml
2121
workflow_call:
22+
outputs:
23+
artifact-prefix:
24+
description: build_charm.yaml `artifact-prefix` output
25+
value: ${{ jobs.build.outputs.artifact-prefix }}
2226

2327
jobs:
2428
lint:
2529
name: Lint
26-
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v26.0.0
30+
uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v29.0.0
2731

2832
unit-test:
2933
name: Unit test charm
@@ -45,9 +49,8 @@ jobs:
4549

4650
build:
4751
name: Build charm
48-
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v26.0.0
52+
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v29.0.0
4953
with:
50-
cache: true
5154
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release
5255

5356
integration-test:
@@ -72,7 +75,7 @@ jobs:
7275
- lint
7376
- unit-test
7477
- build
75-
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v26.0.0
78+
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v29.0.0
7679
with:
7780
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
7881
architecture: ${{ matrix.architecture }}

.github/workflows/release.yaml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,15 @@ jobs:
4040
credentials: "${{ secrets.CHARMHUB_TOKEN }}"
4141
github-token: "${{ secrets.GITHUB_TOKEN }}"
4242

43-
build:
44-
name: Build charm
45-
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
46-
with:
47-
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release
48-
4943
release:
5044
name: Release charm
5145
needs:
5246
- ci-tests
53-
- build
54-
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
47+
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
5548
with:
5649
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release
5750
channel: 14/edge
58-
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
51+
artifact-prefix: ${{ needs.ci-tests.outputs.artifact-prefix }}
5952
secrets:
6053
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}
6154
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: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,11 @@ optional = true
6565
[tool.poetry.group.integration.dependencies]
6666
lightkube = "^0.15.5"
6767
pytest = "^8.3.3"
68-
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/github_secrets"}
68+
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/github_secrets"}
6969
pytest-operator = "^0.38.0"
70-
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
71-
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
72-
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
70+
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
71+
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
72+
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
7373
# renovate caret doesn't work: https://github.com/renovatebot/renovate/issues/26940
7474
juju = "<=3.6.1.0"
7575
psycopg2-binary = "^2.9.10"

0 commit comments

Comments
 (0)