From 44a7a801a88b5bf3474e03e4da70ea118b5154e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Thu, 28 Dec 2023 13:49:31 +0100 Subject: [PATCH 1/4] [ci] Switch runner to ubuntu-latest --- .github/workflows/ci-units-types.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-units-types.yml b/.github/workflows/ci-units-types.yml index a9cc5a6e711..ede495357c3 100644 --- a/.github/workflows/ci-units-types.yml +++ b/.github/workflows/ci-units-types.yml @@ -9,7 +9,7 @@ on: jobs: unit_tests: name: Unit and Static Type tests for KIWI python code - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest strategy: matrix: python-version: ["3.9", "3.10", "3.11"] From b2609243d8950fd7ccf5c34151b1430972cdf1f1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Thu, 28 Dec 2023 13:51:19 +0100 Subject: [PATCH 2/4] Only run the job for this python environment --- .github/workflows/ci-units-types.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-units-types.yml b/.github/workflows/ci-units-types.yml index ede495357c3..04e065e1c9c 100644 --- a/.github/workflows/ci-units-types.yml +++ b/.github/workflows/ci-units-types.yml @@ -25,5 +25,6 @@ jobs: python -m pip install --upgrade pip python -m pip install tox - name: Run unit and type tests - run: | - tox -e unit_py3_9,unit_py3_10,unit_py3_11 + run: tox -e "unit_py${PY_VER/./_}" + env: + PY_VER: ${{ matrix.python-version }} From 33b1c690968a84f98357e0beafe2f7fd408cc451 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Thu, 28 Dec 2023 13:51:52 +0100 Subject: [PATCH 3/4] Add unit test job using python 3.12 --- .github/workflows/ci-units-types.yml | 2 +- tox.ini | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci-units-types.yml b/.github/workflows/ci-units-types.yml index 04e065e1c9c..4962be50523 100644 --- a/.github/workflows/ci-units-types.yml +++ b/.github/workflows/ci-units-types.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.9", "3.10", "3.11"] + python-version: ["3.9", "3.10", "3.11", "3.12"] steps: - uses: actions/checkout@v3 diff --git a/tox.ini b/tox.ini index 49241e68b66..44a3618f3da 100644 --- a/tox.ini +++ b/tox.ini @@ -17,6 +17,7 @@ skip_missing_interpreters = True skipsdist = True envlist = check, + unit_py3_12, unit_py3_11, unit_py3_10, unit_py3_9, @@ -25,7 +26,7 @@ envlist = [testenv] description = - {unit_py3_9,unit_py3_10,unit_py3_11}: Unit Test run with basepython set to {basepython} + {unit_py3_9,unit_py3_10,unit_py3_11,unit_py3_12}: Unit Test run with basepython set to {basepython} devel: Test KIWI allowlist_externals = bash @@ -79,6 +80,14 @@ changedir=test/unit commands = {[testenv:unit]commands} +# Unit Test run with basepython set to 3.12 +[testenv:unit_py3_12] +setenv = + PYTHONPATH={toxinidir}/test +changedir=test/unit +commands = + {[testenv:unit]commands} + [testenv:unit] description = Unit Test Base From eaa029332ebf7db68fc26ca22647f61e92345a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20=C4=8Cerm=C3=A1k?= Date: Thu, 28 Dec 2023 13:52:32 +0100 Subject: [PATCH 4/4] Use xdist on the CI to speed up the test runs --- .github/workflows/ci-units-types.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci-units-types.yml b/.github/workflows/ci-units-types.yml index 4962be50523..8cba4998204 100644 --- a/.github/workflows/ci-units-types.yml +++ b/.github/workflows/ci-units-types.yml @@ -25,6 +25,6 @@ jobs: python -m pip install --upgrade pip python -m pip install tox - name: Run unit and type tests - run: tox -e "unit_py${PY_VER/./_}" + run: tox -e "unit_py${PY_VER/./_}" -- -n auto env: PY_VER: ${{ matrix.python-version }}