Skip to content

Commit

Permalink
Updated pipelines to include Juju3
Browse files Browse the repository at this point in the history
  • Loading branch information
juditnovak committed Oct 25, 2023
1 parent 267d5ce commit 9f12cea
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ jobs:
run: tox run -e lint

unit-test:
strategy:
matrix:
juju-version: ["2.9", "3.1"]
name: Unit test charm
runs-on: ubuntu-latest
timeout-minutes: 5
Expand All @@ -41,6 +44,10 @@ jobs:
pipx install poetry
- name: Run tests
run: tox run -e unit
env:
# This env var is only to indicate Juju version to "simulate" in the unit tests
# No libjuju is being actually used in unit testing
LIBJUJU_VERSION_SPECIFIER: ${{ matrix.juju-version }}
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3

Expand Down Expand Up @@ -112,7 +119,7 @@ jobs:
include:
- juju-snap-channel: "3.1/stable"
agent-version: "3.1.6"
libjuju-version: "3.2.0.1"
libjuju-version: "3.2.2"
- juju-snap-channel: "2.9/stable"
agent-version: "2.9.45"
libjuju-version: "2.9.44.1"
Expand All @@ -135,6 +142,11 @@ jobs:
uses: charmed-kubernetes/actions-operator@main
with:
provider: lxd
bootstrap-options: "--agent-version ${{ matrix.agent-version }}"
juju-channel: ${{ matrix.juju-snap-channel }}
- name: Update python-libjuju version
if: ${{ matrix.libjuju-version == '2.9.44.1' }}
run: poetry add --lock --group integration juju@'${{ matrix.libjuju-version }}'
- name: Download packed charm(s)
uses: actions/download-artifact@v3
with:
Expand All @@ -152,3 +164,5 @@ jobs:
fi
- name: Run integration tests
run: tox run -e integration -- "${{ matrix.groups.path_to_test_file }}" --group="${{ matrix.groups.group_number }}" -m '${{ steps.select-test-stability.outputs.mark_expression }}' --mysql-router-charm-series=${{ matrix.ubuntu-versions.series }} --mysql-router-charm-bases-index=${{ matrix.ubuntu-versions.bases-index }}
env:
LIBJUJU_VERSION_SPECIFIER: ${{ matrix.libjuju-version }}

0 comments on commit 9f12cea

Please sign in to comment.