Skip to content

Commit 50cbaa6

Browse files
moved v1 testing to separate dispatch only workflow
1 parent 27aff7d commit 50cbaa6

File tree

2 files changed

+157
-146
lines changed

2 files changed

+157
-146
lines changed

.github/workflows/ci_cd.yml

Lines changed: 0 additions & 146 deletions
Original file line numberDiff line numberDiff line change
@@ -594,152 +594,6 @@ jobs:
594594
docker logs ${GEO_CONT_NAME}
595595
docker rm ${GEO_CONT_NAME}
596596
597-
testing-windows-v1:
598-
name: Testing and coverage (Windows - v1)
599-
needs: [smoke-tests]
600-
runs-on: windows-latest
601-
strategy:
602-
fail-fast: false
603-
matrix:
604-
python-version: ['3.10', '3.13']
605-
606-
steps:
607-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
608-
with:
609-
persist-credentials: false
610-
611-
- name: Set up Python
612-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
613-
with:
614-
python-version: ${{ matrix.python-version }}
615-
616-
- name: Set up headless display
617-
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
618-
619-
- name: Install packages for testing
620-
run: |
621-
python -m pip install --upgrade pip
622-
pip install --upgrade build wheel
623-
pip install -e . --group tests
624-
625-
- name: Login to GitHub Container Registry
626-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
627-
with:
628-
registry: ghcr.io
629-
username: ${{ github.actor }}
630-
password: ${{ secrets.GITHUB_TOKEN }}
631-
632-
- name: Download Geometry service container (if needed)
633-
env:
634-
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:core-windows-latest"
635-
run: |
636-
Write-Host "Pulling Docker image: $env:FULL_IMAGE_NAME"
637-
docker pull $env:FULL_IMAGE_NAME
638-
639-
- name: Start Geometry service and verify start
640-
env:
641-
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:core-windows-latest"
642-
PORT_MAPPING: "${{ env.ANSRV_GEO_PORT }}:50051"
643-
TRANSPORT_MODE_SELECTION: ${{ secrets.TRANSPORT_MODE_SELECTION }}
644-
run: |
645-
# Write command to file launch.txt for sanitizing purposes
646-
echo "docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER -p $env:PORT_MAPPING $env:FULL_IMAGE_NAME $env:TRANSPORT_MODE_SELECTION" | Out-File -FilePath launch.txt
647-
# Read the file and execute the command
648-
$command = Get-Content -Path launch.txt | Select-String -Pattern "docker run"
649-
Invoke-Expression $command.Line
650-
Start-Sleep -Seconds 10
651-
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
652-
653-
- name: Restore images cache
654-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
655-
with:
656-
path: .\tests\integration\image_cache
657-
key: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
658-
restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}
659-
lookup-only: false # zizmor: ignore[cache-poisoning]
660-
661-
- name: Testing
662-
timeout-minutes: 20 # Sometimes hangs...
663-
run: |
664-
pytest -v --proto-version=v1
665-
666-
- name: Stop the Geometry service
667-
if: always()
668-
run: |
669-
docker stop $env:GEO_CONT_NAME
670-
docker logs $env:GEO_CONT_NAME
671-
docker rm $env:GEO_CONT_NAME
672-
673-
testing-linux-v1:
674-
name: Testing and coverage (Linux - v1)
675-
needs: [smoke-tests]
676-
runs-on: ubuntu-latest
677-
strategy:
678-
fail-fast: false
679-
matrix:
680-
python-version: ['3.10', '3.13']
681-
682-
steps:
683-
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
684-
with:
685-
persist-credentials: false
686-
687-
- name: Set up Python
688-
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
689-
with:
690-
python-version: ${{ matrix.python-version }}
691-
692-
- name: Set up headless display
693-
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
694-
695-
- name: Install packages for testing
696-
run: |
697-
python -m pip install --upgrade pip
698-
pip install --upgrade build wheel
699-
pip install -e . --group tests
700-
701-
- name: Login to GitHub Container Registry
702-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
703-
with:
704-
registry: ghcr.io
705-
username: ${{ github.actor }}
706-
password: ${{ secrets.GITHUB_TOKEN }}
707-
708-
- name: Download Geometry service container (if needed)
709-
env:
710-
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:core-linux-latest"
711-
run: |
712-
echo "Pulling Docker image: ${FULL_IMAGE_NAME}"
713-
docker pull ${FULL_IMAGE_NAME}
714-
715-
- name: Start Geometry service and verify start
716-
env:
717-
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:core-linux-latest"
718-
TRANSPORT_MODE_SELECTION: ${{ secrets.TRANSPORT_MODE_SELECTION }}
719-
run: |
720-
docker run --detach --name ${GEO_CONT_NAME} -e LICENSE_SERVER=${ANSRV_GEO_LICENSE_SERVER} -p ${ANSRV_GEO_PORT}:50051 ${FULL_IMAGE_NAME} ${TRANSPORT_MODE_SELECTION}
721-
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
722-
723-
- name: Restore images cache
724-
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
725-
with:
726-
path: tests/integration/image_cache
727-
key: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
728-
restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}
729-
lookup-only: false # zizmor: ignore[cache-poisoning]
730-
731-
- name: Testing
732-
timeout-minutes: 20 # Sometimes hangs...
733-
run: |
734-
pytest -v --proto-version=v1
735-
736-
- name: Stop the Geometry service
737-
if: always()
738-
run: |
739-
docker stop ${GEO_CONT_NAME}
740-
docker logs ${GEO_CONT_NAME}
741-
docker rm ${GEO_CONT_NAME}
742-
743597
package:
744598
name: Package library
745599
needs: [testing-windows, testing-linux, testing-min-reqs, testing-no-graphics, docs]

.github/workflows/v1_testing.yml

Lines changed: 157 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,157 @@
1+
name: v1 Protos Testing
2+
on:
3+
workflow_dispatch:
4+
5+
env:
6+
MAIN_PYTHON_VERSION: '3.13'
7+
PACKAGE_NAME: 'ansys-geometry-core'
8+
ANSRV_GEO_IMAGE: 'ghcr.io/ansys/geometry'
9+
ANSRV_GEO_PORT: 700
10+
ANSRV_GEO_LICENSE_SERVER: ${{ secrets.LICENSE_SERVER }}
11+
GEO_CONT_NAME: ans_geo
12+
RESET_IMAGE_CACHE: 0
13+
14+
jobs:
15+
testing-windows-v1:
16+
name: Testing and coverage (Windows - v1 Protos)
17+
runs-on: windows-latest
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
python-version: ['3.10', '3.13']
22+
23+
steps:
24+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
25+
with:
26+
persist-credentials: false
27+
28+
- name: Set up Python
29+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
30+
with:
31+
python-version: ${{ matrix.python-version }}
32+
33+
- name: Set up headless display
34+
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
35+
36+
- name: Install packages for testing
37+
run: |
38+
python -m pip install --upgrade pip
39+
pip install --upgrade build wheel
40+
pip install -e . --group tests
41+
42+
- name: Login to GitHub Container Registry
43+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
44+
with:
45+
registry: ghcr.io
46+
username: ${{ github.actor }}
47+
password: ${{ secrets.GITHUB_TOKEN }}
48+
49+
- name: Download Geometry service container (if needed)
50+
env:
51+
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:core-windows-latest"
52+
run: |
53+
Write-Host "Pulling Docker image: $env:FULL_IMAGE_NAME"
54+
docker pull $env:FULL_IMAGE_NAME
55+
56+
- name: Start Geometry service and verify start
57+
env:
58+
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:core-windows-latest"
59+
PORT_MAPPING: "${{ env.ANSRV_GEO_PORT }}:50051"
60+
TRANSPORT_MODE_SELECTION: ${{ secrets.TRANSPORT_MODE_SELECTION }}
61+
run: |
62+
# Write command to file launch.txt for sanitizing purposes
63+
echo "docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER -p $env:PORT_MAPPING $env:FULL_IMAGE_NAME $env:TRANSPORT_MODE_SELECTION" | Out-File -FilePath launch.txt
64+
# Read the file and execute the command
65+
$command = Get-Content -Path launch.txt | Select-String -Pattern "docker run"
66+
Invoke-Expression $command.Line
67+
Start-Sleep -Seconds 10
68+
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
69+
70+
- name: Restore images cache
71+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
72+
with:
73+
path: .\tests\integration\image_cache
74+
key: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
75+
restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}
76+
lookup-only: false # zizmor: ignore[cache-poisoning]
77+
78+
- name: Testing
79+
timeout-minutes: 20 # Sometimes hangs...
80+
run: |
81+
pytest -v --proto-version=v1
82+
83+
- name: Stop the Geometry service
84+
if: always()
85+
run: |
86+
docker stop $env:GEO_CONT_NAME
87+
docker logs $env:GEO_CONT_NAME
88+
docker rm $env:GEO_CONT_NAME
89+
90+
testing-linux-v1:
91+
name: Testing and coverage (Linux - v1 Protos)
92+
runs-on: ubuntu-latest
93+
strategy:
94+
fail-fast: false
95+
matrix:
96+
python-version: ['3.10', '3.13']
97+
98+
steps:
99+
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v5.0.1
100+
with:
101+
persist-credentials: false
102+
103+
- name: Set up Python
104+
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
105+
with:
106+
python-version: ${{ matrix.python-version }}
107+
108+
- name: Set up headless display
109+
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
110+
111+
- name: Install packages for testing
112+
run: |
113+
python -m pip install --upgrade pip
114+
pip install --upgrade build wheel
115+
pip install -e . --group tests
116+
117+
- name: Login to GitHub Container Registry
118+
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
119+
with:
120+
registry: ghcr.io
121+
username: ${{ github.actor }}
122+
password: ${{ secrets.GITHUB_TOKEN }}
123+
124+
- name: Download Geometry service container (if needed)
125+
env:
126+
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:core-linux-latest"
127+
run: |
128+
echo "Pulling Docker image: ${FULL_IMAGE_NAME}"
129+
docker pull ${FULL_IMAGE_NAME}
130+
131+
- name: Start Geometry service and verify start
132+
env:
133+
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:core-linux-latest"
134+
TRANSPORT_MODE_SELECTION: ${{ secrets.TRANSPORT_MODE_SELECTION }}
135+
run: |
136+
docker run --detach --name ${GEO_CONT_NAME} -e LICENSE_SERVER=${ANSRV_GEO_LICENSE_SERVER} -p ${ANSRV_GEO_PORT}:50051 ${FULL_IMAGE_NAME} ${TRANSPORT_MODE_SELECTION}
137+
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
138+
139+
- name: Restore images cache
140+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
141+
with:
142+
path: tests/integration/image_cache
143+
key: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}-${{ hashFiles('pyproject.toml') }}
144+
restore-keys: pyvista-image-cache-${{ runner.os }}-v-${{ env.RESET_IMAGE_CACHE }}
145+
lookup-only: false # zizmor: ignore[cache-poisoning]
146+
147+
- name: Testing
148+
timeout-minutes: 20 # Sometimes hangs...
149+
run: |
150+
pytest -v --proto-version=v1
151+
152+
- name: Stop the Geometry service
153+
if: always()
154+
run: |
155+
docker stop ${GEO_CONT_NAME}
156+
docker logs ${GEO_CONT_NAME}
157+
docker rm ${GEO_CONT_NAME}

0 commit comments

Comments
 (0)