From 9510e88c0ff17ebb02193ad131d103c8f46ca2d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Tue, 17 Sep 2024 13:34:35 +0200 Subject: [PATCH] CI: determine the libdnf python version from /osb/libdnf-python-version MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Instead of hard-coding the Python version that the installed python3-dnf has been built against on the latest Fedora, read the value from the osbuild-ci container. The container now has the version written in /osb/libdnf-python-version. Signed-off-by: Tomáš Hozza --- .github/workflows/test.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 36d8d73d..2436c6ed 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -30,7 +30,7 @@ jobs: - name: "Run" uses: osbuild/containers/src/actions/privdocker@552e30cf1b4ed19c6ddaa57f96c342b3dff4227b with: - image: ghcr.io/osbuild/osbuild-ci:latest-202404252004 + image: ghcr.io/osbuild/osbuild-ci:latest-202409171558 run: | # Hacky replacement of container storage driver: # The default overlayfs doesn't work in the runner, so let's change @@ -49,7 +49,8 @@ jobs: # We need to use the version from the system to test things. # Since we are running tests on Fedora, enable site packages only # for Python version which is available on Fedora. - if [ "${{ matrix.environment }}" == "py312" ]; then + # See also: https://github.com/osbuild/containers/pull/79 + if [ "${{ matrix.environment }}" == "$(cat /osb/libdnf-python-version)" ]; then TOX_ARGS="-x testenv.sitepackages=True" fi fi @@ -68,7 +69,7 @@ jobs: # Using 4 workers is a bit arbitrary, "auto" is probably too aggressive. TEST_WORKERS: "-n 4" with: - image: ghcr.io/osbuild/osbuild-ci:latest-202404252004 + image: ghcr.io/osbuild/osbuild-ci:latest-202409171558 run: | OSBUILD_TEST_STORE="${{ env.OSBUILD_TEST_STORE }}" \ tox -e "py36" -- ${{ env.TEST_WORKERS }} test.run.test_assemblers