Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/ci_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,25 @@ jobs:

tests:
name: "Tests and coverage"
runs-on: ${{ matrix.os }}
runs-on: "ubuntu-latest"
strategy:
matrix:
# We can't test on windows because it is not possible to run linux
# docker images on the windows agents. See the issue
# https://github.com/actions/runner-images/issues/1143
os: [ubuntu-latest]
python-version: ['3.10', '3.11', '3.12', '3.13']
container-tag: [ 'latest' ]
include:
- python-version: "3.13"
container-tag: "2025r2"
- python-version: "3.13"
container-tag: "2025r1"
- python-version: "3.13"
container-tag: "2024r2"
- python-version: "3.13"
container-tag: "2024r1"
- python-version: "3.13"
container-tag: "2023r2_pre1"
fail-fast: false
steps:
- name: "Login in Github Container registry"
Expand All @@ -75,12 +86,7 @@ jobs:
# 2023r2_pre1 is used to test backward compatibility. Also update testenv in tox.ini
# if other containers must be tested.
run: |
docker pull ghcr.io/ansys/pydpf-composites:${{ env.CONTAINER_TAG }}
docker pull ghcr.io/ansys/pydpf-composites:2025r2
docker pull ghcr.io/ansys/pydpf-composites:2025r1
docker pull ghcr.io/ansys/pydpf-composites:2024r2
docker pull ghcr.io/ansys/pydpf-composites:2024r1
docker pull ghcr.io/ansys/pydpf-composites:2023r2_pre1
docker pull ghcr.io/ansys/pydpf-composites:${{ matrix.container-tag }}

- name: "Checkout the project"
uses: actions/checkout@v5
Expand All @@ -101,6 +107,7 @@ jobs:
tox
env:
LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
CONTAINER_TAG: ${{ matrix.container-tag }}

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
Expand Down
2 changes: 1 addition & 1 deletion tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
ANSYS_PATH_OPTION_KEY = "--ansys-path"
LICENSE_SERVER_OPTION_KEY = "--license-server"
ANSYSLMD_LICENSE_FILE_KEY = "ANSYSLMD_LICENSE_FILE"
DOCKER_IMAGE_TAG_KEY = "--image-tag"
DOCKER_IMAGE_TAG_KEY = "--container-tag"
DEFAULT_DOCKER_IMAGE_TAG = "latest"


Expand Down
7 changes: 1 addition & 6 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,7 @@ setenv =
PYTEST_COV_APPEND_ARG = --cov-append
commands =
poetry install -E test
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}
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}
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}
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}
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}
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}
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}

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