Skip to content

Commit 40c19c1

Browse files
committed
2 parents 62ca792 + 1b3f923 commit 40c19c1

File tree

141 files changed

+3768
-158
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

141 files changed

+3768
-158
lines changed
Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Backwards compatibility tests
2+
on:
3+
pull_request:
4+
workflow_dispatch:
5+
push:
6+
tags:
7+
- "*"
8+
branches:
9+
- main
10+
11+
env:
12+
MAIN_PYTHON_VERSION: '3.13'
13+
ANSRV_GEO_IMAGE: 'ghcr.io/ansys/geometry'
14+
ANSRV_GEO_PORT: 700
15+
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
16+
GEO_CONT_NAME: ans_geo
17+
IS_WORKFLOW_RUNNING: True
18+
19+
concurrency:
20+
group: ${{ github.workflow }}-${{ github.ref }}
21+
cancel-in-progress: true
22+
23+
permissions:
24+
contents: read
25+
packages: read
26+
id-token: write
27+
28+
jobs:
29+
30+
# =================================================================================================
31+
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
32+
# =================================================================================================
33+
34+
testing-backwards-compatibility-windows:
35+
name: Windows ${{ matrix.backend-version }}
36+
runs-on: [self-hosted, Windows, pygeometry]
37+
strategy:
38+
fail-fast: false
39+
matrix:
40+
include:
41+
- image-tag: "windows-24.1"
42+
backend-version: "24.1"
43+
- image-tag: "windows-24.2"
44+
backend-version: "24.2"
45+
- image-tag: "windows-25.1"
46+
backend-version: "25.1"
47+
- image-tag: "core-windows-25.2"
48+
backend-version: "25.2"
49+
steps:
50+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
51+
52+
- name: Set up Python
53+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
54+
with:
55+
python-version: ${{ env.MAIN_PYTHON_VERSION }}
56+
57+
- name: Set up headless display
58+
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
59+
60+
- name: Create Python venv
61+
run: |
62+
python -m venv .venv
63+
.\.venv\Scripts\Activate.ps1
64+
65+
- name: Install packages for testing
66+
run: |
67+
.\.venv\Scripts\Activate.ps1
68+
python -m pip install --upgrade pip
69+
pip install --upgrade build wheel
70+
pip install .[tests]
71+
72+
- name: Login to GitHub Container Registry
73+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
74+
with:
75+
registry: ghcr.io
76+
username: ${{ github.actor }}
77+
password: ${{ secrets.GITHUB_TOKEN }}
78+
79+
- name: Download Geometry service container (if needed)
80+
run: docker pull ${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.image-tag }}
81+
82+
- name: Check location of self-hosted runner and define license server accordingly
83+
if: runner.name == 'pygeometry-ci-2'
84+
run:
85+
echo "ANSRV_GEO_LICENSE_SERVER=${{ secrets.INTERNAL_LICENSE_SERVER }}" | Out-File -FilePath $env:GITHUB_ENV -Append
86+
87+
- name: Stop any running containers
88+
run: |
89+
$dockerContainers = docker ps -a -q
90+
if (-not [string]::IsNullOrEmpty($dockerContainers)) {
91+
docker stop $dockerContainers
92+
docker rm $dockerContainers
93+
}
94+
95+
- name: Start Geometry service and verify start
96+
run: |
97+
.\.venv\Scripts\Activate.ps1
98+
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.image-tag }}
99+
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
100+
101+
- name: Testing
102+
run: |
103+
.\.venv\Scripts\Activate.ps1
104+
pytest -v --backwards-compatibility=yes --backend-version=${{ matrix.backend-version }} -rf
105+
106+
- name: Upload coverage to Codecov
107+
uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3
108+
env:
109+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
110+
with:
111+
files: .cov/xml
112+
113+
- name: Stop the Geometry service
114+
if: always()
115+
run: |
116+
docker stop ${{ env.GEO_CONT_NAME }}
117+
docker logs ${{ env.GEO_CONT_NAME }}
118+
docker rm ${{ env.GEO_CONT_NAME }}
119+
120+
- name: Stop any remaining containers
121+
if: always()
122+
run: |
123+
$dockerContainers = docker ps -a -q
124+
if (-not [string]::IsNullOrEmpty($dockerContainers)) {
125+
docker stop $dockerContainers
126+
docker rm $dockerContainers
127+
}
128+
129+
# =================================================================================================
130+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
131+
# =================================================================================================

.github/workflows/ci_cd.yml

Lines changed: 71 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ env:
1919
GEO_CONT_NAME: ans_geo
2020
RESET_IMAGE_CACHE: 5
2121
IS_WORKFLOW_RUNNING: True
22-
ARTIFACTORY_VERSION: v252
22+
ARTIFACTORY_VERSION: v261
2323

2424
concurrency:
2525
group: ${{ github.workflow }}-${{ github.ref }}
@@ -39,7 +39,7 @@ jobs:
3939
contents: write
4040
pull-requests: write
4141
steps:
42-
- uses: ansys/actions/doc-deploy-changelog@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
42+
- uses: ansys/actions/doc-deploy-changelog@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
4343
with:
4444
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
4545
bot-user: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
@@ -49,7 +49,7 @@ jobs:
4949
name: Vulnerabilities
5050
runs-on: ubuntu-latest
5151
steps:
52-
- uses: ansys/actions/check-vulnerabilities@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
52+
- uses: ansys/actions/check-vulnerabilities@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
5353
with:
5454
python-version: ${{ env.MAIN_PYTHON_VERSION }}
5555
python-package-name: ${{ env.PACKAGE_NAME }}
@@ -62,7 +62,7 @@ jobs:
6262
runs-on: ubuntu-latest
6363
steps:
6464
- name: Check commit name
65-
uses: ansys/actions/check-pr-title@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
65+
uses: ansys/actions/check-pr-title@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
6666
with:
6767
token: ${{ secrets.GITHUB_TOKEN }}
6868

@@ -71,7 +71,7 @@ jobs:
7171
runs-on: ubuntu-latest
7272
steps:
7373
- name: PyAnsys documentation style checks
74-
uses: ansys/actions/doc-style@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
74+
uses: ansys/actions/doc-style@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
7575
with:
7676
token: ${{ secrets.GITHUB_TOKEN }}
7777

@@ -90,7 +90,7 @@ jobs:
9090
os: macos-latest
9191
steps:
9292
- name: Build wheelhouse and perform smoke test
93-
uses: ansys/actions/build-wheelhouse@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
93+
uses: ansys/actions/build-wheelhouse@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
9494
with:
9595
library-name: ${{ env.PACKAGE_NAME }}
9696
operating-system: ${{ matrix.os }}
@@ -102,7 +102,7 @@ jobs:
102102
runs-on: ubuntu-latest
103103
steps:
104104
- name: PyAnsys documentation style checks
105-
uses: ansys/actions/docker-style@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
105+
uses: ansys/actions/docker-style@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
106106
with:
107107
directory: docker
108108
recursive: true
@@ -320,6 +320,10 @@ jobs:
320320
docker rm $dockerContainers
321321
}
322322
323+
# =================================================================================================
324+
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
325+
# =================================================================================================
326+
323327
docs:
324328
name: Documentation
325329
needs: [docs-style]
@@ -341,7 +345,7 @@ jobs:
341345
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_DOCS_TAG }}
342346
343347
- name: Run Ansys documentation building action
344-
uses: ansys/actions/doc-build@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
348+
uses: ansys/actions/doc-build@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
345349
with:
346350
python-version: ${{ env.MAIN_PYTHON_VERSION }}
347351
add-pdf-html-docs-as-assets: true
@@ -356,11 +360,6 @@ jobs:
356360
docker logs ${{ env.GEO_CONT_NAME }}
357361
docker rm ${{ env.GEO_CONT_NAME }}
358362
359-
360-
# =================================================================================================
361-
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
362-
# =================================================================================================
363-
364363
testing-linux:
365364
name: Testing and coverage (Linux)
366365
needs: [smoke-tests, manifests]
@@ -432,7 +431,7 @@ jobs:
432431

433432
- name: Run pytest
434433
if: env.SKIP_UNSTABLE == 'false'
435-
uses: ansys/actions/tests-pytest@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
434+
uses: ansys/actions/tests-pytest@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
436435
env:
437436
ALLOW_PLOTTING: true
438437
with:
@@ -526,6 +525,58 @@ jobs:
526525
docker logs ${{ env.GEO_CONT_NAME }}
527526
docker rm ${{ env.GEO_CONT_NAME }}
528527
528+
testing-min-reqs-tracker:
529+
name: Testing with minimum requirements with tracker
530+
needs: [smoke-tests]
531+
runs-on: ubuntu-latest
532+
env:
533+
ANSRV_GEO_IMAGE_MINREQS: 'ghcr.io/ansys/geometry:core-linux-latest'
534+
strategy:
535+
fail-fast: false
536+
matrix:
537+
python-version: ['3.10', '3.13']
538+
steps:
539+
- name: Set up headless display
540+
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
541+
542+
- name: Login in Github Container registry
543+
uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
544+
with:
545+
registry: ghcr.io
546+
username: ${{ github.actor }}
547+
password: ${{ secrets.GITHUB_TOKEN }}
548+
549+
- name: Checkout repository
550+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
551+
552+
- name: Setup Python ${{ matrix.python-version }}
553+
uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
554+
with:
555+
python-version: ${{ matrix.python-version }}
556+
557+
- name: Install minimum requirements with tracker
558+
run: |
559+
python -m pip install --upgrade pip
560+
pip install -e .[all,tests-minimal]
561+
pip install pytest
562+
563+
- name: Start Geometry service and verify start
564+
run: |
565+
docker pull ${{ env.ANSRV_GEO_IMAGE_MINREQS }}
566+
docker run --detach --name ${{ env.GEO_CONT_NAME }} -e LICENSE_SERVER=${{ env.ANSRV_GEO_LICENSE_SERVER }} -p ${{ env.ANSRV_GEO_PORT }}:50051 ${{ env.ANSRV_GEO_IMAGE_MINREQS }}
567+
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
568+
569+
- name: Run pytest
570+
run: |
571+
pytest -v --use-tracker=yes
572+
573+
- name: Stop the Geometry service
574+
if: always()
575+
run: |
576+
docker stop ${{ env.GEO_CONT_NAME }}
577+
docker logs ${{ env.GEO_CONT_NAME }}
578+
docker rm ${{ env.GEO_CONT_NAME }}
579+
529580
testing-no-graphics:
530581
name: Testing with minimum requirements (no graphics)
531582
needs: [smoke-tests]
@@ -588,7 +639,7 @@ jobs:
588639
id-token: write
589640
steps:
590641
- name: Build library source and wheel artifacts
591-
uses: ansys/actions/build-library@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
642+
uses: ansys/actions/build-library@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
592643
with:
593644
library-name: ${{ env.PACKAGE_NAME }}
594645
python-version: ${{ env.MAIN_PYTHON_VERSION }}
@@ -818,7 +869,7 @@ jobs:
818869
restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}
819870

820871
- name: Run pytest
821-
uses: ansys/actions/tests-pytest@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
872+
uses: ansys/actions/tests-pytest@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
822873
env:
823874
ALLOW_PLOTTING: true
824875
with:
@@ -859,7 +910,7 @@ jobs:
859910
contents: write
860911
steps:
861912
- name: Release to GitHub
862-
uses: ansys/actions/release-github@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
913+
uses: ansys/actions/release-github@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
863914
with:
864915
token: ${{ secrets.GITHUB_TOKEN }}
865916
library-name: ${{ env.PACKAGE_NAME }}
@@ -899,7 +950,7 @@ jobs:
899950
needs: [package]
900951
steps:
901952
- name: Deploy the latest documentation
902-
uses: ansys/actions/doc-deploy-dev@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
953+
uses: ansys/actions/doc-deploy-dev@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
903954
with:
904955
cname: ${{ env.DOCUMENTATION_CNAME }}
905956
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
@@ -913,7 +964,7 @@ jobs:
913964
needs: [release, release-pypi]
914965
steps:
915966
- name: Deploy the stable documentation
916-
uses: ansys/actions/doc-deploy-stable@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
967+
uses: ansys/actions/doc-deploy-stable@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
917968
with:
918969
cname: ${{ env.DOCUMENTATION_CNAME }}
919970
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
@@ -930,7 +981,7 @@ jobs:
930981
pull-requests: write
931982
steps:
932983
- name: Automerge PRs
933-
uses: ansys/actions/hk-automerge-prs@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
984+
uses: ansys/actions/hk-automerge-prs@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
934985
with:
935986
approver: ${{ secrets.PYANSYS_CI_BOT_USERNAME }}
936987
approver-token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}

.github/workflows/codeql.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ jobs:
2222
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
2323

2424
- name: Initialize CodeQL
25-
uses: github/codeql-action/init@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
25+
uses: github/codeql-action/init@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
2626
with:
2727
languages: 'python'
2828
config-file: ./.github/codeql-config.yml
2929

3030
- name: Autobuild
31-
uses: github/codeql-action/autobuild@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
31+
uses: github/codeql-action/autobuild@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
3232

3333
# If the Autobuild fails above, remove it and uncomment the following three lines.
3434
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.
@@ -38,6 +38,6 @@ jobs:
3838
# ./location_of_script_within_repo/buildscript.sh
3939

4040
- name: Perform CodeQL Analysis
41-
uses: github/codeql-action/analyze@181d5eefc20863364f96762470ba6f862bdef56b # v3.29.2
41+
uses: github/codeql-action/analyze@4e828ff8d448a8a6e532957b1811f387a63867e8 # v3.29.4
4242
with:
4343
category: "/language:python"

.github/workflows/docker_cleanup.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
steps:
2323

2424
- name: "Perform versions cleanup - except certain tags"
25-
uses: ansys/actions/hk-package-clean-except@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
25+
uses: ansys/actions/hk-package-clean-except@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
2626
with:
2727
package-name: 'geometry'
2828
token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/label.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
pull-requests: write
107107
runs-on: ubuntu-latest
108108
steps:
109-
- uses: ansys/actions/doc-changelog@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
109+
- uses: ansys/actions/doc-changelog@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
110110
with:
111111
token: ${{ secrets.PYANSYS_CI_BOT_TOKEN }}
112112
use-conventional-commits: true

.github/workflows/nightly_docker_test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ jobs:
220220
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
221221

222222
- name: Run pytest
223-
uses: ansys/actions/tests-pytest@8d3e4946f36c2a7d447b92e34b1022a5c9dc77a7 # v10.0.12
223+
uses: ansys/actions/tests-pytest@2031be5b84d9f8c1d56a54912209aa489b469a0f # v10.0.13
224224
env:
225225
ALLOW_PLOTTING: true
226226
with:

0 commit comments

Comments
 (0)