From 1cc0ec0c9a0d1947e6cf04f23c3f9639ea07f7b1 Mon Sep 17 00:00:00 2001 From: Adam Dyess Date: Thu, 7 Mar 2024 13:39:47 -0600 Subject: [PATCH] test with juju2.9 using a constraints file on pylibjuju --- .github/workflows/main.yml | 6 +++++- constraints-juju29.txt | 1 + tox.ini | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 constraints-juju29.txt diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2ada1ae..d65d7f2 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - juju: ["3/stable", 3.1/stable] + juju: ["3/stable", 2.9/stable] timeout-minutes: 360 steps: - name: Check out code @@ -52,6 +52,10 @@ jobs: uses: actions/setup-python@v2 with: python-version: 3.8 + - name: Constrain Tox Environment for juju 2.9 + if: ${{ matrix.juju == '2.9/stable' }} + run: | + echo "TEST_CONSTRAINTS_FILE=constraints-juju29.txt" >> $GITHUB_ENV - name: Install Dependencies run: | pip install tox diff --git a/constraints-juju29.txt b/constraints-juju29.txt new file mode 100644 index 0000000..8555898 --- /dev/null +++ b/constraints-juju29.txt @@ -0,0 +1 @@ +juju < 3.0 \ No newline at end of file diff --git a/tox.ini b/tox.ini index b4057ae..6667dd5 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,9 @@ commands = flake8 reactive lib tests unit_tests [testenv:func] basepython = python3 -deps = -r{toxinidir}/test-requirements.txt +deps = + -c {env:TEST_CONSTRAINTS_FILE:https://raw.githubusercontent.com/openstack-charmers/zaza-openstack-tests/master/constraints/constraints-2024.1.txt} + -r{toxinidir}/test-requirements.txt allowlist_externals = /bin/bash /bin/ln