@@ -150,10 +150,10 @@ jobs:
150
150
with :
151
151
path : ' pr'
152
152
153
- - name : checkou -develop-branch
153
+ - name : checkout -develop-branch
154
154
uses : actions/checkout@v4
155
155
with :
156
- ref : ' develop'
156
+ ref : develop
157
157
path : ' develop'
158
158
159
159
- name : install-depedencies
@@ -187,7 +187,8 @@ jobs:
187
187
# Use git diff to compare the two directories and get a list of changes
188
188
# The command exits with 0 if no changes, 1 if changes are found.
189
189
# We use '|| true' to prevent the workflow from stopping here on failure.
190
- diff_output=$(git diff --no-index --name-status ./develop/tidy3d/schemas ./pr/tidy3d/schemas || true)
190
+ cd $GITHUB_WORKSPACE/develop
191
+ diff_output=$(git diff --no-index --name-status $GITHUB_WORKSPACE/develop/schemas $GITHUB_WORKSPACE/pr/schemas || true)
191
192
192
193
# Check if there are any changes
193
194
if [ -z "$diff_output" ]; then
@@ -234,7 +235,7 @@ jobs:
234
235
# Run on open PRs OR when manually triggered with local_tests=true
235
236
needs : determine-test-scope
236
237
if : needs.determine-test-scope.outputs.local_tests == 'true'
237
- name : Python ${{ matrix.python-version }} - self-hosted-runner
238
+ name : python- ${{ matrix.python-version }}- self-hosted-runner
238
239
runs-on : [ slurm-runner, 4xcpu ]
239
240
container :
240
241
image : ghcr.io/astral-sh/uv:debian
@@ -258,7 +259,7 @@ jobs:
258
259
fetch-depth : 0 # Required 0 for diff report.
259
260
submodules : false
260
261
261
- - name : Install project
262
+ - name : install- project
262
263
env :
263
264
PYTHON_VERSION : ${{ matrix.python-version }}
264
265
run : |
@@ -279,7 +280,7 @@ jobs:
279
280
echo "Testing vtk is correctly installed."
280
281
python -c "import vtk"
281
282
282
- - name : Run tests with coverage
283
+ - name : run- tests- coverage
283
284
env :
284
285
PYTHONUNBUFFERED : " 1"
285
286
run : |
@@ -292,7 +293,7 @@ jobs:
292
293
echo "total=$TOTAL_COVERAGE" >> "$GITHUB_ENV"
293
294
echo "### Total coverage: ${TOTAL_COVERAGE}%"
294
295
295
- - name : Produce the diff coverage report
296
+ - name : diff- coverage- report
296
297
if : >-
297
298
matrix.python-version == '3.13' &&
298
299
github.event_name == 'pull_request' &&
@@ -343,7 +344,7 @@ jobs:
343
344
# Run tests on a push event OR a workflow dispatch with remote_tests
344
345
needs : determine-test-scope
345
346
if : needs.determine-test-scope.outputs.remote_tests == 'true'
346
- name : Python ${{ matrix.python-version }} - ${{ matrix.platform }}
347
+ name : python- ${{ matrix.python-version }}- ${{ matrix.platform }}
347
348
runs-on : ${{ matrix.platform }}
348
349
permissions :
349
350
contents : read
@@ -369,19 +370,19 @@ jobs:
369
370
fetch-depth : 1
370
371
submodules : false
371
372
372
- - name : Install Poetry
373
+ - name : install-poetry
373
374
uses : snok/install-poetry@v1
374
375
with :
375
376
version : 2.1.1
376
377
virtualenvs-create : true
377
378
virtualenvs-in-project : true
378
379
379
- - name : Set up Python ${{ matrix.python-version }}
380
+ - name : set-python- ${{ matrix.python-version }}
380
381
uses : actions/setup-python@v4
381
382
with :
382
383
python-version : ${{ matrix.python-version }}
383
384
384
- - name : Install project
385
+ - name : install- project
385
386
run : |
386
387
poetry --version
387
388
poetry env use python
@@ -390,11 +391,11 @@ jobs:
390
391
poetry run pip install gdstk --only-binary gdstk
391
392
poetry install -E dev
392
393
393
- - name : Run doctests
394
+ - name : run- doctests
394
395
run : |
395
396
poetry run pytest -rF --tb=short tidy3d
396
397
397
- - name : Run tests with coverage
398
+ - name : run- tests- coverage
398
399
env :
399
400
PYTHONUNBUFFERED : " 1"
400
401
run : |
@@ -405,7 +406,7 @@ jobs:
405
406
echo "total=$TOTAL_COVERAGE" >> "$GITHUB_ENV"
406
407
echo "### Total coverage: ${TOTAL_COVERAGE}%"
407
408
408
- - name : " Create badge"
409
+ - name : create- badge
409
410
if : ${{ github.ref == 'refs/heads/develop' }}
410
411
# https://gist.githubusercontent.com/nedbat/8c6980f77988a327348f9b02bbaf67f5
411
412
uses :
schneegans/[email protected]
@@ -423,10 +424,11 @@ jobs:
423
424
pr-requirements-pass :
424
425
name : pr-requirements-pass
425
426
if : |
426
- always() &&
427
- ( needs.determine-test-scope.outputs.pr_approval_state == 'true' ) &&
427
+ always() &&
428
+ ((github.event_name == 'pull_request') || (github.event_name == 'pull_request_review')) &&
429
+ (( needs.determine-test-scope.outputs.pr_approval_state == 'true' ) &&
428
430
( needs.determine-test-scope.outputs.local_tests == 'true' ) ||
429
- ( needs.determine-test-scope.outputs.remote_tests == 'true' )
431
+ ( needs.determine-test-scope.outputs.remote_tests == 'true' ))
430
432
needs : [local-tests, remote-tests, lint, verify-schema-change]
431
433
runs-on : ubuntu-latest
432
434
steps :
0 commit comments