|
8 | 8 | pull_request: |
9 | 9 | push: |
10 | 10 | branches: [23_2] |
| 11 | + workflow_dispatch: |
| 12 | + |
| 13 | +env: |
| 14 | + RUN_TESTS: ${{ (github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'force all tests')) && 'true' || 'false' }} |
11 | 15 |
|
12 | 16 | jobs: |
| 17 | + check-should-run: |
| 18 | + name: Check if tests should run |
| 19 | + runs-on: devextreme-shr2 |
| 20 | + outputs: |
| 21 | + should-run: ${{ steps.check.outputs.should-run }} |
| 22 | + steps: |
| 23 | + - name: Check RUN_TESTS flag |
| 24 | + id: check |
| 25 | + run: echo "should-run=${{ env.RUN_TESTS }}" >> $GITHUB_OUTPUT |
| 26 | + |
13 | 27 | build: |
14 | 28 | runs-on: devextreme-shr2 |
15 | 29 | name: Build |
| 30 | + needs: check-should-run |
| 31 | + if: needs.check-should-run.outputs.should-run == 'true' |
16 | 32 | timeout-minutes: 15 |
17 | 33 |
|
18 | 34 | steps: |
|
57 | 73 | retention-days: 1 |
58 | 74 |
|
59 | 75 | qunit-tests-timezones: |
60 | | - needs: build |
| 76 | + needs: [check-should-run, build] |
| 77 | + if: needs.check-should-run.outputs.should-run == 'true' |
61 | 78 | runs-on: devextreme-shr2 |
62 | 79 | name: ${{ matrix.constel }}-${{ matrix.timezone }} |
63 | 80 | timeout-minutes: 15 |
@@ -112,7 +129,8 @@ jobs: |
112 | 129 | useCsp: 'false' |
113 | 130 |
|
114 | 131 | qunit-tests-mobile-and-shadow-dom: |
115 | | - needs: build |
| 132 | + needs: [check-should-run, build] |
| 133 | + if: needs.check-should-run.outputs.should-run == 'true' |
116 | 134 | runs-on: devextreme-shr2 |
117 | 135 | name: ${{ matrix.constel }}-${{ matrix.kind }} |
118 | 136 | timeout-minutes: 15 |
@@ -178,7 +196,8 @@ jobs: |
178 | 196 | useCsp: 'true' |
179 | 197 |
|
180 | 198 | qunit-tests-firefox: |
181 | | - needs: build |
| 199 | + needs: [check-should-run, build] |
| 200 | + if: needs.check-should-run.outputs.should-run == 'true' |
182 | 201 | runs-on: devextreme-shr2 |
183 | 202 | name: ${{ matrix.constel }}-firefox |
184 | 203 | timeout-minutes: 15 |
@@ -216,7 +235,8 @@ jobs: |
216 | 235 | useCsp: 'true' |
217 | 236 |
|
218 | 237 | qunit-tests-no-csp: |
219 | | - needs: build |
| 238 | + needs: [check-should-run, build] |
| 239 | + if: needs.check-should-run.outputs.should-run == 'true' |
220 | 240 | runs-on: devextreme-shr2 |
221 | 241 | name: ${{ matrix.constel }}-no-csp |
222 | 242 | timeout-minutes: 15 |
|
0 commit comments