Skip to content

Commit 0f97e06

Browse files
committed
Run old server version tests in separate CI jobs
1 parent 7dd8669 commit 0f97e06

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

.github/workflows/ci_cd.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -54,14 +54,27 @@ jobs:
5454

5555
tests:
5656
name: "Tests and coverage"
57-
runs-on: ${{ matrix.os }}
57+
runs-on: "ubuntu-latest"
5858
strategy:
5959
matrix:
6060
# We can't test on windows because it is not possible to run linux
6161
# docker images on the windows agents. See the issue
6262
# https://github.com/actions/runner-images/issues/1143
63-
os: [ubuntu-latest]
6463
python-version: ['3.10', '3.11', '3.12', '3.13']
64+
container-tag: [ 'latest' ]
65+
include:
66+
- python-version: "3.13"
67+
container-tag: "2025r2"
68+
- python-version: "3.13"
69+
container-tag: "2025r1"
70+
- python-version: "3.13"
71+
container-tag: "2025r2"
72+
- python-version: "3.13"
73+
container-tag: "2024r2"
74+
- python-version: "3.13"
75+
container-tag: "2024r1"
76+
- python-version: "3.13"
77+
container-tag: "2023r2_pre1"
6578
fail-fast: false
6679
steps:
6780
- name: "Login in Github Container registry"
@@ -75,12 +88,7 @@ jobs:
7588
# 2023r2_pre1 is used to test backward compatibility. Also update testenv in tox.ini
7689
# if other containers must be tested.
7790
run: |
78-
docker pull ghcr.io/ansys/pydpf-composites:${{ env.CONTAINER_TAG }}
79-
docker pull ghcr.io/ansys/pydpf-composites:2025r2
80-
docker pull ghcr.io/ansys/pydpf-composites:2025r1
81-
docker pull ghcr.io/ansys/pydpf-composites:2024r2
82-
docker pull ghcr.io/ansys/pydpf-composites:2024r1
83-
docker pull ghcr.io/ansys/pydpf-composites:2023r2_pre1
91+
docker pull ghcr.io/ansys/pydpf-composites:${{ matrix.container-tag }}
8492
8593
- name: "Checkout the project"
8694
uses: actions/checkout@v5
@@ -101,6 +109,7 @@ jobs:
101109
tox
102110
env:
103111
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
112+
CONTAINER_TAG: ${{ matrix.container-tag }}
104113

105114
- name: Upload coverage reports to Codecov
106115
uses: codecov/codecov-action@v5

tests/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
ANSYS_PATH_OPTION_KEY = "--ansys-path"
5252
LICENSE_SERVER_OPTION_KEY = "--license-server"
5353
ANSYSLMD_LICENSE_FILE_KEY = "ANSYSLMD_LICENSE_FILE"
54-
DOCKER_IMAGE_TAG_KEY = "--image-tag"
54+
DOCKER_IMAGE_TAG_KEY = "--container-tag"
5555
DEFAULT_DOCKER_IMAGE_TAG = "latest"
5656

5757

tox.ini

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,7 @@ setenv =
3131
PYTEST_COV_APPEND_ARG = --cov-append
3232
commands =
3333
poetry install -E test
34-
poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --image-tag=latest {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {env:PYTEST_COV_APPEND_ARG:} {posargs:-vv}
35-
poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --image-tag=2025r2 {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {env:PYTEST_COV_APPEND_ARG:} {posargs:-vv}
36-
poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --image-tag=2025r1 {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {env:PYTEST_COV_APPEND_ARG:} {posargs:-vv}
37-
poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --image-tag=2024r2 {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {env:PYTEST_COV_APPEND_ARG:} {posargs:-vv}
38-
poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --image-tag=2024r1 {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {env:PYTEST_COV_APPEND_ARG:} {posargs:-vv}
39-
poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --image-tag=2023r2_pre1 {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {env:PYTEST_COV_APPEND_ARG:} {posargs:-vv}
34+
poetry run pytest --reruns 1 --license-server={env:LICENSE_SERVER:} --container-tag={env:CONTAINER_TAG:latest} {env:PYTEST_MARKERS:} {env:PYTEST_EXTRA_ARGS:} {env:PYTEST_COV_APPEND_ARG:} {posargs:-vv}
4035

4136
[testenv:test-minimal]
4237
description = Checks for project unit tests with minimal package versions

0 commit comments

Comments
 (0)