From c42c965102d9ec2eb58e6fdcf68543773e851c2c Mon Sep 17 00:00:00 2001 From: Felipe Reyes Date: Wed, 17 Jan 2024 12:22:50 -0300 Subject: [PATCH] Pass a constraint to pin libjuju 3.x in the functional test --- .github/workflows/tox.yaml | 17 +++++++++++++---- tox.ini | 4 ---- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/tox.yaml b/.github/workflows/tox.yaml index ae100a03..75b76fd3 100644 --- a/.github/workflows/tox.yaml +++ b/.github/workflows/tox.yaml @@ -62,20 +62,24 @@ jobs: - 2.9/stable - 3.1/stable - 3.2/stable + - 3.3/stable bundle: - first - second - third include: - juju_channel: 2.9/stable - extra: juju-29 snap_install_flags: "--classic" + pip_constraints: constraints-juju29.txt - juju_channel: 3.1/stable - extra: juju-31 snap_install_flags: "" + pip_constraints: constraints-juju31.txt - juju_channel: 3.2/stable - extra: juju-32 snap_install_flags: "" + pip_constraints: constraints-juju32.txt + - juju_channel: 3.3/stable + snap_install_flags: "" + pip_constraints: constraints-juju33.txt env: TEST_ZAZA_BUG_LP1987332: "on" # http://pad.lv/1987332 needs: build @@ -84,6 +88,10 @@ jobs: - name: Install dependencies run: | set -euxo pipefail + sudo apt-get update + sudo apt-get install -yq snapd + sudo systemctl enable snapd + sudo systemctl restart snapd python -m pip install --upgrade pip pip install tox tox-gh-actions sudo snap install ${{ matrix.snap_install_flags }} --channel ${{ matrix.juju_channel }} juju @@ -105,7 +113,8 @@ jobs: run: | set -euxo pipefail mkdir logs - env EXTRA=${{ matrix.extra }} tox -e func-target -- ${{ matrix.bundle }} | tee logs/tox-output.txt + export PIP_CONSTRAINTS=$(pwd)/${{ matrix.pip_constraints }} + tox -e func-target -- ${{ matrix.bundle }} | tee logs/tox-output.txt - name: crashdump on failure if: failure() run: | diff --git a/tox.ini b/tox.ini index 878f0de4..323a9cd0 100644 --- a/tox.ini +++ b/tox.ini @@ -36,15 +36,12 @@ commands = /bin/true [flake8] ignore = E402,E226,W504 -deps = -r{toxinidir}/test-requirements.txt per-file-ignores = unit_tests/**: D [testenv:docs] basepython = python3 changedir = doc/source -deps = - -r{toxinidir}/doc-requirements.txt commands = sphinx-build -W -b html -d {toxinidir}/doc/build/doctrees . {toxinidir}/doc/build/html [testenv:func] @@ -55,7 +52,6 @@ commands = [testenv:func-target] basepython = python3 -deps = -r{toxinidir}/test-requirements.txt commands = {envdir}/bin/python3 setup.py install functest-run-suite --keep-model --bundle {posargs}