Skip to content

Commit

Permalink
New env vars to indicate Juju version
Browse files Browse the repository at this point in the history
  • Loading branch information
juditnovak committed Oct 2, 2023
1 parent f34aded commit c496617
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand Down
3 changes: 3 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand All @@ -78,6 +80,7 @@ pass_env =
CI
GITHUB_OUTPUT
SECRETS_FROM_GITHUB
LIBJUJU_VERSION_SPECIFIER
allowlist_externals =
{[testenv:pack-wrapper]allowlist_externals}
commands_pre =
Expand Down

0 comments on commit c496617

Please sign in to comment.