Skip to content

Commit 5d453a2

Browse files
committed
ci: cleanup
1 parent e56dbec commit 5d453a2

File tree

2 files changed

+4
-75
lines changed

2 files changed

+4
-75
lines changed

.github/workflows/ci_cd.yml

Lines changed: 2 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,6 @@ jobs:
167167
echo "skip_${SERVICE}=0" >> "$GITHUB_OUTPUT"
168168
fi
169169
170-
# =================================================================================================
171-
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv RUNNING ON SELF-HOSTED RUNNER vvvvvvvvvvvvvvvvvvvvvvvvvvvvvv
172-
# =================================================================================================
173-
174170
testing-windows:
175171
name: Testing and coverage (Windows)
176172
needs: [smoke-tests, manifests]
@@ -228,19 +224,12 @@ jobs:
228224
if: env.SKIP_UNSTABLE == 'false'
229225
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
230226

231-
- name: Create Python venv
232-
if: env.SKIP_UNSTABLE == 'false'
233-
run: |
234-
python -m venv .venv
235-
.\.venv\Scripts\Activate.ps1
236-
237227
- name: Install packages for testing
238228
if: env.SKIP_UNSTABLE == 'false'
239229
run: |
240-
.\.venv\Scripts\Activate.ps1
241230
python -m pip install --upgrade pip
242231
pip install --upgrade build wheel
243-
pip install .[tests]
232+
pip install -e .[tests]
244233
245234
- name: Login to GitHub Container Registry
246235
if: env.SKIP_UNSTABLE == 'false'
@@ -258,22 +247,13 @@ jobs:
258247
Write-Host "Pulling Docker image: $env:FULL_IMAGE_NAME"
259248
docker pull $env:FULL_IMAGE_NAME
260249
261-
- name: Stop any running containers
262-
run: |
263-
$dockerContainers = docker ps -a -q
264-
if (-not [string]::IsNullOrEmpty($dockerContainers)) {
265-
docker stop $dockerContainers
266-
docker rm $dockerContainers
267-
}
268-
269250
- name: Start Geometry service and verify start
270251
if: env.SKIP_UNSTABLE == 'false'
271252
env:
272253
FULL_IMAGE_NAME: "${{ env.ANSRV_GEO_IMAGE }}:${{ matrix.docker-image }}"
273254
PORT_MAPPING: "${{ env.ANSRV_GEO_PORT }}:50051"
274255
TRANSPORT_MODE_SELECTION: ${{ secrets.TRANSPORT_MODE_SELECTION }}
275256
run: |
276-
.\.venv\Scripts\Activate.ps1
277257
# Write command to file launch.txt for sanitizing purposes
278258
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
279259
# Read the file and execute the command
@@ -293,9 +273,8 @@ jobs:
293273

294274
- name: Testing
295275
if: env.SKIP_UNSTABLE == 'false'
296-
timeout-minutes: 20 # On Windows self-hosted runners, sometimes hangs...
276+
timeout-minutes: 20 # Sometimes hangs...
297277
run: |
298-
.\.venv\Scripts\Activate.ps1
299278
pytest -v
300279
301280
- name: Upload integration test logs
@@ -341,19 +320,6 @@ jobs:
341320
docker rm $env:GEO_CONT_NAME
342321
}
343322
344-
- name: Stop any remaining containers
345-
if: always()
346-
run: |
347-
$dockerContainers = docker ps -a -q
348-
if (-not [string]::IsNullOrEmpty($dockerContainers)) {
349-
docker stop $dockerContainers
350-
docker rm $dockerContainers
351-
}
352-
353-
# =================================================================================================
354-
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
355-
# =================================================================================================
356-
357323
docs:
358324
name: Documentation
359325
needs: [docs-style]

.github/workflows/nightly_docker_test.yml

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -90,10 +90,6 @@ jobs:
9090
echo "skip_${SERVICE}=0" >> "$GITHUB_OUTPUT"
9191
fi
9292
93-
# =================================================================================================
94-
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95-
# =================================================================================================
96-
9793
windows-tests:
9894
name: Windows Core Service
9995
needs: manifests
@@ -117,16 +113,10 @@ jobs:
117113
- name: Set up headless display
118114
uses: pyvista/setup-headless-display-action@7d84ae825e6d9297a8e99bdbbae20d1b919a0b19 # v4.2
119115

120-
- name: Create Python venv
121-
run: |
122-
python -m venv .venv
123-
.\.venv\Scripts\Activate.ps1
124-
125116
- name: Install packages for testing
126117
run: |
127-
.\.venv\Scripts\Activate.ps1
128118
pip install --upgrade build
129-
pip install .[tests]
119+
pip install -e .[tests]
130120
131121
- name: Login to GitHub Container Registry
132122
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
@@ -140,19 +130,11 @@ jobs:
140130
docker image rm $env:ANSRV_GEO_IMAGE_WINDOWS_CORE_TAG
141131
docker pull $env:ANSRV_GEO_IMAGE_WINDOWS_CORE_TAG
142132
143-
- name: Check location of self-hosted runner and define license server accordingly
144-
if: runner.name == 'pygeometry-ci-2'
145-
env:
146-
LICENSE_SERVER_INTERNAL: ${{ secrets.LICENSE_SERVER_INTERNAL }}
147-
run:
148-
echo "ANSRV_GEO_LICENSE_SERVER=$env:LICENSE_SERVER_INTERNAL" | Out-File -FilePath $env:GITHUB_ENV -Append
149-
150133
- name: Start Geometry service and verify start
151134
env:
152135
TRANSPORT_MODE_SELECTION: ${{ secrets.TRANSPORT_MODE_SELECTION }}
153136
PORT_MAPPING: "${{ env.ANSRV_GEO_PORT }}:50051"
154137
run: |
155-
.\.venv\Scripts\Activate.ps1
156138
# Write command to file launch.txt for sanitizing purposes
157139
echo "docker run --detach --name $env:GEO_CONT_NAME -e LICENSE_SERVER=$env:ANSRV_GEO_LICENSE_SERVER -p $env:PORT_MAPPING $env:ANSRV_GEO_IMAGE_WINDOWS_CORE_TAG $env:TRANSPORT_MODE_SELECTION" | Out-File -FilePath launch.txt
158140
# Read the file and execute the command
@@ -162,9 +144,8 @@ jobs:
162144
python -c "from ansys.geometry.core.connection.validate import validate; validate()"
163145
164146
- name: Run PyAnsys Geometry tests
165-
timeout-minutes: 20 # On Windows self-hosted runners, sometimes hangs...
147+
timeout-minutes: 20 # Sometimes hangs...
166148
run: |
167-
.\.venv\Scripts\Activate.ps1
168149
pytest -v
169150
170151
- name: Stop the Geometry service
@@ -174,19 +155,6 @@ jobs:
174155
docker logs $env:GEO_CONT_NAME
175156
docker rm $env:GEO_CONT_NAME
176157
177-
- name: Stop any remaining containers
178-
if: always()
179-
run: |
180-
$dockerContainers = docker ps -a -q
181-
if (-not [string]::IsNullOrEmpty($dockerContainers)) {
182-
docker stop $dockerContainers
183-
docker rm $dockerContainers
184-
}
185-
186-
- name: Clean all Docker dangling images
187-
if: always()
188-
run: docker image prune -f
189-
190158
- name: Microsoft Teams Notification
191159
uses: skitionek/notify-microsoft-teams@11e40c38c3a629ae65a985b582eca4897b01e79e # v1.0.9
192160
if: failure()
@@ -215,11 +183,6 @@ jobs:
215183
]
216184
}
217185
218-
219-
# =================================================================================================
220-
# ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RUNNING ON SELF-HOSTED RUNNER ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
221-
# =================================================================================================
222-
223186
linux-tests:
224187
name: Linux Core Service
225188
needs: manifests

0 commit comments

Comments
 (0)