1- # check spelling, codestyle
21name : GitHub CI
32
43# run only on main branch. This avoids duplicated actions on PRs
@@ -114,6 +113,12 @@ jobs:
114113 strategy :
115114 matrix :
116115 python-version : ["3.10", "3.11", "3.12"]
116+ server-version : ["latest"]
117+ include :
118+ - python-version : " 3.12"
119+ server-version : " 2024R2"
120+ - python-version : " 3.12"
121+ server-version : " 2025R1"
117122
118123 steps :
119124 - uses : actions/checkout@v4
@@ -170,42 +175,23 @@ jobs:
170175 poetry run pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files --docker-image=$IMAGE_NAME --cov=ansys.acp.core --cov-report=term --cov-report=xml --cov-report=html
171176 env :
172177 LICENSE_SERVER : ${{ secrets.LICENSE_SERVER }}
173- IMAGE_NAME : ${{ env.DOCKER_IMAGE_NAME }}
178+ IMAGE_NAME : ghcr.io/ansys/acp: ${{ matrix.server-version }}
174179
175180 - name : " Upload coverage to Codecov"
176181 uses : codecov/codecov-action@v4
177182 env :
178183 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
179184 with :
180185 files : coverage.xml
181- flags : ' server-latest,python-${{ matrix.python-version }}'
182-
183- - name : " Unit testing (2024R2 server)"
184- if : matrix.python-version == env.MAIN_PYTHON_VERSION
185- working-directory : tests/unittests
186- run : |
187- docker pull $IMAGE_NAME
188- poetry run pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files --docker-image=$IMAGE_NAME --cov=ansys.acp.core --cov-report=term --cov-report=xml --cov-report=html
189- env :
190- LICENSE_SERVER : ${{ secrets.LICENSE_SERVER }}
191- IMAGE_NAME : " ghcr.io/ansys/acp:2024r2"
192-
193- - name : " Upload coverage to Codecov (2024R2 server)"
194- if : matrix.python-version == env.MAIN_PYTHON_VERSION
195- uses : codecov/codecov-action@v4
196- env :
197- CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
198- with :
199- files : coverage.xml
200- flags : ' server-242,python-${{ matrix.python-version }}'
186+ flags : ' server-${{ matrix.server-version }},python-${{ matrix.python-version }}'
201187
202188 - name : Benchmarks
203189 working-directory : tests/benchmarks
204190 run : |
205- poetry run pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files --docker-image=$IMAGE_NAME --build-benchmark-image --benchmark-json benchmark_output.json --benchmark-group-by=fullname ${{ (matrix.python-version == '3.10 ' && github.ref == 'refs/heads/main') && ' ' || '--validate-benchmarks-only' }}
191+ poetry run pytest -v --license-server=1055@$LICENSE_SERVER --no-server-log-files --docker-image=$IMAGE_NAME --build-benchmark-image --benchmark-json benchmark_output.json --benchmark-group-by=fullname ${{ (matrix.python-version == env.MAIN_PYTHON_VERSION && matrix.server-version == 'latest ' && github.ref == 'refs/heads/main') && ' ' || '--validate-benchmarks-only' }}
206192 env :
207193 LICENSE_SERVER : ${{ secrets.LICENSE_SERVER }}
208- IMAGE_NAME : ${{ env.DOCKER_IMAGE_NAME }}
194+ IMAGE_NAME : ghcr.io/ansys/acp: ${{ matrix.server-version }}
209195
210196 - name : Store benchmark result
211197 uses : benchmark-action/github-action-benchmark@v1
@@ -216,7 +202,7 @@ jobs:
216202 benchmark-data-dir-path : benchmarks
217203 auto-push : true
218204 github-token : ${{ secrets.GITHUB_TOKEN }}
219- if : matrix.python-version == env.MAIN_PYTHON_VERSION && github.ref == 'refs/heads/main'
205+ if : matrix.python-version == env.MAIN_PYTHON_VERSION && matrix.server-version == 'latest' && github.ref == 'refs/heads/main'
220206
221207 doctest :
222208 name : Test documentation snippets
0 commit comments