From c49661736a74e27baca0e68dca1def06373e2f79 Mon Sep 17 00:00:00 2001 From: Judit Novak Date: Mon, 2 Oct 2023 16:19:20 +0200 Subject: [PATCH] New env vars to indicate Juju version --- .github/workflows/ci.yaml | 6 ++++++ tox.ini | 3 +++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0cfd37820..c16a756b0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -19,6 +19,10 @@ jobs: uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v4.2.3 unit-test: + strategy: + fail-fast: false + matrix: + juju-version: ["2.9", "3.1"] name: Unit test charm runs-on: ubuntu-latest timeout-minutes: 5 @@ -31,6 +35,8 @@ jobs: pipx install poetry - name: Run tests run: tox run -e unit + env: + LIBJUJU_VERSION_SPECIFIER: ${{ matrix.juju-version }} - name: Upload Coverage to Codecov uses: codecov/codecov-action@v3 diff --git a/tox.ini b/tox.ini index ed74e208c..3e139787f 100644 --- a/tox.ini +++ b/tox.ini @@ -60,6 +60,8 @@ commands = [testenv:unit] description = Run unit tests +pass_env = + LIBJUJU_VERSION_SPECIFIER commands_pre = poetry install --only main,charm-libs,unit commands = @@ -78,6 +80,7 @@ pass_env = CI GITHUB_OUTPUT SECRETS_FROM_GITHUB + LIBJUJU_VERSION_SPECIFIER allowlist_externals = {[testenv:pack-wrapper]allowlist_externals} commands_pre =