88 pull_request :
99 push :
1010 branches : [24_1]
11+ workflow_dispatch :
1112
1213env :
1314 NX_CLOUD_ACCESS_TOKEN : ${{ secrets.NX_TOKEN }}
1415 NX_SKIP_NX_CACHE : ${{ (github.event_name != 'pull_request' || contains( github.event.pull_request.labels.*.name, 'skip-cache')) && 'true' || 'false' }}
16+ RUN_TESTS : ${{ (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'force all tests')) && 'true' || 'false' }}
1517
1618jobs :
19+ check-should-run :
20+ name : Check if tests should run
21+ runs-on : devextreme-shr2
22+ outputs :
23+ should-run : ${{ steps.check.outputs.should-run }}
24+ steps :
25+ - name : Check RUN_TESTS flag
26+ id : check
27+ run : echo "should-run=${{ env.RUN_TESTS }}" >> $GITHUB_OUTPUT
28+
1729 build :
1830 runs-on : devextreme-shr2
1931 name : Build
32+ needs : check-should-run
33+ if : needs.check-should-run.outputs.should-run == 'true'
2034 timeout-minutes : 25
2135
2236 steps :
6276 retention-days : 1
6377
6478 qunit-tests-timezones :
65- needs : build
79+ needs : [check-should-run, build]
80+ if : needs.check-should-run.outputs.should-run == 'true'
6681 runs-on : devextreme-shr2
6782 name : ${{ matrix.constel }}-${{ matrix.timezone }}
6883 timeout-minutes : 25
@@ -120,7 +135,8 @@ jobs:
120135# useCsp: 'false'
121136
122137 qunit-tests-mobile-and-shadow-dom :
123- needs : build
138+ needs : [check-should-run, build]
139+ if : needs.check-should-run.outputs.should-run == 'true'
124140 runs-on : devextreme-shr2
125141 name : ${{ matrix.constel }}-${{ matrix.kind }}
126142 timeout-minutes : 25
@@ -170,7 +186,8 @@ jobs:
170186 useCsp : ' true'
171187
172188 qunit-tests-firefox :
173- needs : build
189+ needs : [check-should-run, build]
190+ if : needs.check-should-run.outputs.should-run == 'true'
174191 runs-on : devextreme-shr2
175192 name : ${{ matrix.constel }}-firefox
176193 timeout-minutes : 25
@@ -208,7 +225,8 @@ jobs:
208225 useCsp : ' true'
209226
210227 qunit-tests-common :
211- needs : build
228+ needs : [check-should-run, build]
229+ if : needs.check-should-run.outputs.should-run == 'true'
212230 runs-on : devextreme-shr2
213231 name : ${{ matrix.constel }}-chrome
214232 timeout-minutes : 25
@@ -232,7 +250,8 @@ jobs:
232250 useCsp : ' true'
233251
234252 qunit-tests-no-csp :
235- needs : build
253+ needs : [check-should-run, build]
254+ if : needs.check-should-run.outputs.should-run == 'true'
236255 runs-on : devextreme-shr2
237256 name : ${{ matrix.constel }}-no-csp
238257 timeout-minutes : 25
0 commit comments