12
12
description : ' local-tests'
13
13
type : boolean
14
14
default : false
15
- push :
16
- branches : [ develop, latest ]
17
15
pull_request :
18
16
branches :
19
17
- latest
20
18
- develop
21
19
- ' pre/*'
22
20
types : ['opened', 'reopened', 'synchronize', 'ready_for_review']
23
- pull_request_review :
24
- types : [submitted]
25
21
26
22
permissions :
27
23
contents : read
89
85
fi
90
86
fi
91
87
92
- # If triggered by PR review and approved
93
- if [[ "$EVENT_NAME" == "pull_request_review" ]]; then
94
- if [[ "$REVIEW_STATE" == "approved" ]]; then
95
- local_tests=true
96
- remote_tests=true
97
- else
98
- local_tests=false
99
- remote_tests=false
100
- fi
101
- fi
102
-
103
88
# All PRs that have been triggered need local tests and approved ones need to re-run the remote tests
104
89
if [[ "$EVENT_NAME" == "pull_request" ]]; then
105
90
local_tests=true
@@ -144,7 +129,9 @@ jobs:
144
129
verify-schema-change :
145
130
name : verify-schema-change
146
131
needs : determine-test-scope
147
- if : (( needs.determine-test-scope.outputs.local_tests == 'true' ) || ( needs.determine-test-scope.outputs.remote_tests == 'true' )) && (github.event_name == 'pull_request')
132
+ if : |
133
+ (( needs.determine-test-scope.outputs.local_tests == 'true' ) ||
134
+ ( needs.determine-test-scope.outputs.remote_tests == 'true' ))
148
135
runs-on : ubuntu-latest
149
136
container : ghcr.io/astral-sh/uv:debian
150
137
defaults :
@@ -247,8 +234,8 @@ jobs:
247
234
image : ghcr.io/astral-sh/uv:debian
248
235
options : --user 31001:61001 # Required slurm-batch UID: slurm GID for tmp/ file removal
249
236
concurrency :
250
- group : local-tests- ${{ github.ref }}-${{ github.event_name }}-python- ${{ matrix.python-version }}
251
- cancel-in-progress : true # Required so it does not use previous state
237
+ group : ${{ github.workflow }}- ${{ github.event.pull_request.number || github.sha }}-${{ github.event_name }- ${{ matrix.python-version }}-local
238
+ cancel-in-progress : true
252
239
strategy :
253
240
matrix :
254
241
python-version : ['3.9', '3.13']
@@ -355,6 +342,9 @@ jobs:
355
342
permissions :
356
343
contents : read
357
344
pull-requests : write
345
+ concurrency :
346
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}-${{ github.event_name }}-${{ matrix.platform }}-${{ matrix.python-version }}-remote
347
+ cancel-in-progress : true
358
348
strategy :
359
349
matrix :
360
350
python-version : ['3.9', '3.10', '3.11', '3.12', '3.13']
@@ -366,10 +356,6 @@ jobs:
366
356
PIP_ONLY_BINARY : gdstk
367
357
MPLBACKEND : agg
368
358
369
- concurrency :
370
- group : ${{ github.workflow }}-${{ github.event.pull_request.number }}-${{ github.event_name }}-${{ matrix.platform }}-${{ matrix.python-version }}-remote
371
- cancel-in-progress : true
372
-
373
359
steps :
374
360
- uses : actions/checkout@v4
375
361
with :
0 commit comments