@@ -26,18 +26,20 @@ concurrency:
26
26
cancel-in-progress : true
27
27
28
28
jobs :
29
+ skip-schedule-on-fork :
30
+ name : Check for schedule trigger on fork
31
+ runs-on : ubuntu-latest
32
+ # if 'schedule' was the trigger,
33
+ # don't run it on contributors' forks
34
+ if : >-
35
+ github.repository == 'python/typing_extensions'
36
+ || github.event_name != 'schedule'
37
+ steps :
38
+ - run : true
39
+
29
40
pydantic :
30
41
name : pydantic tests
31
- if : >-
32
- # if 'schedule' was the trigger,
33
- # don't run it on contributors' forks
34
- ${{
35
- github.event_name != 'schedule'
36
- || (
37
- github.repository == 'python/typing_extensions'
38
- && github.event_name == 'schedule'
39
- )
40
- }}
42
+ needs : skip-schedule-on-fork
41
43
strategy :
42
44
fail-fast : false
43
45
matrix :
72
74
73
75
typing_inspect :
74
76
name : typing_inspect tests
75
- if : >-
76
- # if 'schedule' was the trigger,
77
- # don't run it on contributors' forks
78
- ${{
79
- github.event_name != 'schedule'
80
- || (
81
- github.repository == 'python/typing_extensions'
82
- && github.event_name == 'schedule'
83
- )
84
- }}
77
+ needs : skip-schedule-on-fork
85
78
strategy :
86
79
fail-fast : false
87
80
matrix :
@@ -117,16 +110,7 @@ jobs:
117
110
118
111
pyanalyze :
119
112
name : pyanalyze tests
120
- if : >-
121
- # if 'schedule' was the trigger,
122
- # don't run it on contributors' forks
123
- ${{
124
- github.event_name != 'schedule'
125
- || (
126
- github.repository == 'python/typing_extensions'
127
- && github.event_name == 'schedule'
128
- )
129
- }}
113
+ needs : skip-schedule-on-fork
130
114
strategy :
131
115
fail-fast : false
132
116
matrix :
@@ -163,16 +147,7 @@ jobs:
163
147
164
148
typeguard :
165
149
name : typeguard tests
166
- if : >-
167
- # if 'schedule' was the trigger,
168
- # don't run it on contributors' forks
169
- ${{
170
- github.event_name != 'schedule'
171
- || (
172
- github.repository == 'python/typing_extensions'
173
- && github.event_name == 'schedule'
174
- )
175
- }}
150
+ needs : skip-schedule-on-fork
176
151
strategy :
177
152
fail-fast : false
178
153
matrix :
@@ -210,16 +185,7 @@ jobs:
210
185
211
186
typed-argument-parser :
212
187
name : typed-argument-parser tests
213
- if : >-
214
- # if 'schedule' was the trigger,
215
- # don't run it on contributors' forks
216
- ${{
217
- github.event_name != 'schedule'
218
- || (
219
- github.repository == 'python/typing_extensions'
220
- && github.event_name == 'schedule'
221
- )
222
- }}
188
+ needs : skip-schedule-on-fork
223
189
strategy :
224
190
fail-fast : false
225
191
matrix :
@@ -262,16 +228,7 @@ jobs:
262
228
263
229
mypy :
264
230
name : stubtest & mypyc tests
265
- if : >-
266
- # if 'schedule' was the trigger,
267
- # don't run it on contributors' forks
268
- ${{
269
- github.event_name != 'schedule'
270
- || (
271
- github.repository == 'python/typing_extensions'
272
- && github.event_name == 'schedule'
273
- )
274
- }}
231
+ needs : skip-schedule-on-fork
275
232
strategy :
276
233
fail-fast : false
277
234
matrix :
@@ -309,16 +266,7 @@ jobs:
309
266
310
267
cattrs :
311
268
name : cattrs tests
312
- if : >-
313
- # if 'schedule' was the trigger,
314
- # don't run it on contributors' forks
315
- ${{
316
- github.event_name != 'schedule'
317
- || (
318
- github.repository == 'python/typing_extensions'
319
- && github.event_name == 'schedule'
320
- )
321
- }}
269
+ needs : skip-schedule-on-fork
322
270
strategy :
323
271
fail-fast : false
324
272
matrix :
0 commit comments