28
28
pull-requests : read
29
29
outputs :
30
30
needs_build : ${{ steps.filter.outputs.needs_build }}
31
+ needs_tests : ${{ steps.filter.outputs.needs_tests }}
31
32
templates : ${{ steps.filter.outputs.templates }}
32
33
steps :
33
34
# https://github.com/actions/virtual-environments/issues/1187
@@ -48,11 +49,18 @@ jobs:
48
49
- 'pnpm-lock.yaml'
49
50
- 'package.json'
50
51
- 'templates/**'
52
+ needs_tests:
53
+ - '.github/workflows/**'
54
+ - 'packages/**'
55
+ - 'test/**'
56
+ - 'pnpm-lock.yaml'
57
+ - 'package.json'
51
58
templates:
52
59
- 'templates/**'
53
60
- name : Log all filter results
54
61
run : |
55
62
echo "needs_build: ${{ steps.filter.outputs.needs_build }}"
63
+ echo "needs_tests: ${{ steps.filter.outputs.needs_tests }}"
56
64
echo "templates: ${{ steps.filter.outputs.templates }}"
57
65
58
66
lint :
@@ -154,8 +162,8 @@ jobs:
154
162
155
163
tests-unit :
156
164
runs-on : ubuntu-latest
157
- needs : build
158
-
165
+ needs : [changes, build]
166
+ if : ${{ needs.changes.outputs.needs_tests == 'true' }}
159
167
steps :
160
168
# https://github.com/actions/virtual-environments/issues/1187
161
169
- name : tune linux network
@@ -186,7 +194,8 @@ jobs:
186
194
187
195
tests-int :
188
196
runs-on : ubuntu-latest
189
- needs : build
197
+ needs : [changes, build]
198
+ if : ${{ needs.changes.outputs.needs_tests == 'true' }}
190
199
name : int-${{ matrix.database }}
191
200
strategy :
192
201
fail-fast : false
@@ -288,7 +297,8 @@ jobs:
288
297
289
298
tests-e2e :
290
299
runs-on : ubuntu-latest
291
- needs : build
300
+ needs : [changes, build]
301
+ if : ${{ needs.changes.outputs.needs_tests == 'true' }}
292
302
name : e2e-${{ matrix.suite }}
293
303
strategy :
294
304
fail-fast : false
@@ -493,8 +503,8 @@ jobs:
493
503
494
504
tests-type-generation :
495
505
runs-on : ubuntu-latest
496
- needs : build
497
-
506
+ needs : [changes, build]
507
+ if : ${{ needs.changes.outputs.needs_tests == 'true' }}
498
508
steps :
499
509
# https://github.com/actions/virtual-environments/issues/1187
500
510
- name : tune linux network
0 commit comments