Skip to content

Commit

Permalink
Merge pull request #124 from canonical/DPE-5699-update-ci-to-test-on-…
Browse files Browse the repository at this point in the history
…juju-3-6

[DPE-5699] - Update ci workflow versions, add juju 3.6, and remove build wrapper
  • Loading branch information
Mehdi-Bendriss authored Oct 18, 2024
2 parents 892ca07 + 6637134 commit 93507f8
Show file tree
Hide file tree
Showing 6 changed files with 830 additions and 806 deletions.
23 changes: 18 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,36 @@ jobs:
- .
- tests/integration/application-charm
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v21.0.1
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v22.0.0
with:
path-to-charm-directory: ${{ matrix.path }}
cache: true

integration-test:
name: Integration test charm
strategy:
matrix:
juju:
# All runs
- agent: 3.5.3 # renovate: juju-agent-pin-minor
allure_report: true

# This runs only on scheduled runs, DPW 21 specifics (scheduled + 3.6/X)
- snap_channel: 3.6/beta
allure_report: false

name: Integration test charm | ${{ matrix.juju.agent || matrix.juju.snap_channel }}

needs:
- lint
- unit-test
- build
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v21.0.1
uses: canonical/data-platform-workflows/.github/workflows/integration_test_charm.yaml@v22.0.0
with:
artifact-prefix: packed-charm-cache-true
cloud: lxd
juju-agent-version: 3.5.3
_beta_allure_report: true
juju-agent-version: ${{ matrix.juju.agent }}
juju-snap-channel: ${{ matrix.juju.snap_channel }}
_beta_allure_report: ${{ matrix.juju.allure_report }}
secrets:
# GitHub appears to redact each line of a multi-line secret
# Avoid putting `{` or `}` on a line by itself so that it doesn't get redacted in logs
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ jobs:

build:
name: Build charm
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v21.0.1
uses: canonical/data-platform-workflows/.github/workflows/build_charm.yaml@v22.0.0

release:
name: Release charm
needs:
- ci-tests
- build
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v21.0.1
uses: canonical/data-platform-workflows/.github/workflows/release_charm.yaml@v22.0.0
with:
channel: 2/edge
artifact-prefix: ${{ needs.build.outputs.artifact-prefix }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sync_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
sync-docs:
name: Sync docs from Discourse
uses: canonical/data-platform-workflows/.github/workflows/_sync_docs.yaml@17.0.1
uses: canonical/data-platform-workflows/.github/workflows/_sync_docs.yaml@22.0.0
secrets:
discourse-api-user: ${{ secrets.DISCOURSE_API_USERNAME }}
discourse-api-key: ${{ secrets.DISCOURSE_API_KEY }}
Expand Down
18 changes: 10 additions & 8 deletions charmcraft.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,6 @@
type: charm
parts:
charm:
override-pull: |
craftctl default
if [[ ! -f requirements.txt ]]
then
echo 'ERROR: Use "tox run -e build-dev" instead of calling "charmcraft pack" directly' >&2
exit 1
fi
charm-strict-dependencies: true
charm-entrypoint: src/charm.py
build-packages:
- pkg-config
Expand All @@ -20,6 +12,16 @@ parts:
- rustc
- cargo
- cmake
build-snaps:
- rustup
override-build: |
rustup default stable
# Convert subset of poetry.lock to requirements.txt
curl -sSL https://install.python-poetry.org | python3 -
/root/.local/bin/poetry export --only main,charm-libs --output requirements.txt
craftctl default
charm-strict-dependencies: true
charm-requirements: [requirements.txt]
bases:
- build-on:
- name: "ubuntu"
Expand Down
Loading

0 comments on commit 93507f8

Please sign in to comment.