Skip to content

Commit 54997a6

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

File tree

3 files changed

+18
-13
lines changed

3 files changed

+18
-13
lines changed

.github/workflows/ci_cd.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,20 @@ jobs:
6262
# https://github.com/actions/runner-images/issues/1143
6363
os: [ubuntu-latest]
6464
python-version: ['3.10', '3.11', '3.12', '3.13']
65+
container-tag: [ 'latest' ]
66+
include:
67+
- python-version: "3.13"
68+
container-tag: "2025r2"
69+
- python-version: "3.13"
70+
container-tag: "2025r1"
71+
- python-version: "3.13"
72+
container-tag: "2025r2"
73+
- python-version: "3.13"
74+
container-tag: "2024r2"
75+
- python-version: "3.13"
76+
container-tag: "2024r1"
77+
- python-version: "3.13"
78+
container-tag: "2023r2_pre1"
6579
fail-fast: false
6680
steps:
6781
- name: "Login in Github Container registry"
@@ -75,12 +89,7 @@ jobs:
7589
# 2023r2_pre1 is used to test backward compatibility. Also update testenv in tox.ini
7690
# if other containers must be tested.
7791
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
92+
docker pull ghcr.io/ansys/pydpf-composites:${{ matrix.container-tag }}
8493
8594
- name: "Checkout the project"
8695
uses: actions/checkout@v5
@@ -101,6 +110,7 @@ jobs:
101110
tox
102111
env:
103112
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
113+
CONTAINER_TAG: ${{ matrix.container-tag }}
104114

105115
- name: Upload coverage reports to Codecov
106116
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)