From d716e6285490e12f82e60686cd8cbf950a47ca38 Mon Sep 17 00:00:00 2001 From: Robert Gildein Date: Thu, 11 Apr 2024 15:47:36 +0200 Subject: [PATCH] Drop bootstack-actions in CI func tests Using master branch for zaza with TEST_JUJU3=1 [1] and dropping bootstack-actions for func in CI to be able to use specific lxd channel. --- [1]: https://github.com/openstack-charmers/zaza/commit/af7eea953dd5d74d3d074fe67b5765dca3911ca6 --- .github/workflows/check.yaml | 34 +++++++++++++++++---------- src/tests/functional/requirements.txt | 2 +- src/tox.ini | 4 +++- 3 files changed, 26 insertions(+), 14 deletions(-) diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index 5df4f72..fc4f66f 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -22,19 +22,29 @@ jobs: working-directory: ./src func: - uses: canonical/bootstack-actions/.github/workflows/func.yaml@v2 + name: Functional tests + runs-on: ubuntu-latest + timeout-minutes: 120 needs: lint-unit strategy: fail-fast: false matrix: - include: - - juju-channel: "3.1/stable" - command: "make functional" - with: - command: ${{ matrix.command }} - juju-channel: ${{ matrix.juju-channel }} - nested-containers: false - provider: "lxd" - python-version: "3.10" - timeout-minutes: 120 - tox-version: "<4" + juju-channel: ['3.4/stable'] + command: ['TEST_JUJU3=1 make functional'] # using TEST_JUJU3 due https://github.com/openstack-charmers/zaza/commit/af7eea953dd5d74d3d074fe67b5765dca3911ca6 + steps: + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.10" + - name: Setup Juju ${{ matrix.juju-channel }} LXD environment + uses: charmed-kubernetes/actions-operator@main + with: + provider: lxd + juju-channel: ${{ matrix.juju-channel }} + - name: Show juju information + run: | + juju version + juju controllers | grep Version -A 1 | awk '{print $9}' + - name: Run functional test + run: ${{ matrix.command }} diff --git a/src/tests/functional/requirements.txt b/src/tests/functional/requirements.txt index f0a09b0..4a6e1d8 100644 --- a/src/tests/functional/requirements.txt +++ b/src/tests/functional/requirements.txt @@ -1,4 +1,4 @@ flake8 mock -git+https://github.com/openstack-charmers/zaza.git@libjuju-3.1#egg=zaza +git+https://github.com/openstack-charmers/zaza.git#egg=zaza python-openstackclient diff --git a/src/tox.ini b/src/tox.ini index 0d12aa7..fd42aa5 100644 --- a/src/tox.ini +++ b/src/tox.ini @@ -22,6 +22,7 @@ passenv = SNAP_HTTP_PROXY SNAP_HTTPS_PROXY OS_* + TEST_* [testenv:lint] commands = @@ -76,4 +77,5 @@ deps = -r{toxinidir}/tests/unit/requirements.txt [testenv:func] changedir = {toxinidir}/tests/functional commands = functest-run-suite {posargs:--keep-faulty-model} -deps = -r {toxinidir}/tests/functional/requirements.txt +deps = + -r {toxinidir}/tests/functional/requirements.txt