Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use single (cached) build for tests & release #155

Merged
merged 2 commits into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,13 @@ concurrency:
on:
pull_request:
schedule:
- cron: '53 0 * * *' # Daily at 00:53 UTC
- cron: '53 0 * * *' # Daily at 00:53 UTC
# Triggered on push to branch "main" by .github/workflows/release.yaml
workflow_call:
outputs:
artifact-prefix:
description: build_charm.yaml `artifact-prefix` output
value: ${{ jobs.build.outputs.artifact-prefix }}

jobs:
lint:
Expand Down Expand Up @@ -136,9 +140,8 @@ jobs:
- .
- tests/integration/application-charm
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v26.0.0
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v29.0.0
with:
cache: true
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release
path-to-charm-directory: ${{ matrix.path }}

Expand All @@ -148,9 +151,9 @@ jobs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v26.0.0
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v29.0.0
with:
artifact-prefix: packed-charm-cache-true
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
cloud: lxd
juju-agent-version: 3.6.1 # renovate: juju-agent-pin-minor
_beta_allure_report: true
Expand Down
11 changes: 2 additions & 9 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,15 @@ jobs:
permissions:
contents: write # Needed for Allure Report beta

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release

release:
name: Release charm
needs:
- ci-tests
- build
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
uses: canonical/data-platform-workflows/.github/workflows/[email protected]
with:
charmcraft-snap-channel: latest/candidate # TODO: remove after charmcraft 3.3 stable release
channel: 2/edge
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
artifact-prefix: ${{ needs.ci-tests.outputs.artifact-prefix }}
secrets:
charmhub-token: ${{ secrets.CHARMHUB_TOKEN }}
permissions:
Expand Down
22 changes: 11 additions & 11 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@ tenacity = "^8.4.2"
coverage = {extras = ["toml"], version = ">7.0"}
pytest-asyncio = "^0.21.2"
pytest-operator = ">0.20"
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
pytest-microceph = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/microceph"}
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/github_secrets"}
pytest-operator-cache = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/pytest_operator_cache"}
pytest-operator-groups = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/pytest_operator_groups"}
pytest-microceph = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/microceph"}
pytest-github-secrets = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/github_secrets"}
allure-pytest = "^2.13.5"
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v26.0.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}
allure-pytest-collection-report = {git = "https://github.com/canonical/data-platform-workflows", tag = "v29.0.0", subdirectory = "python/pytest_plugins/allure_pytest_collection_report"}

[tool.pyright]
include = ["src"]
Expand Down
Loading