Skip to content

Commit 966098b

Browse files
authored
chore(ci): Add new Ci job that runs after required test jobs (#6180)
1 parent bfe819d commit 966098b

File tree

1 file changed

+28
-9
lines changed

1 file changed

+28
-9
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ jobs:
238238
timeout-minutes: 15
239239
runs-on: ubuntu-latest
240240
# Size Check will error out outside of the context of a PR
241-
if: ${{ github.event_name == 'pull_request' }} || ${{ startsWith(github.ref, 'refs/heads/master/') }}
241+
if: github.event_name == 'pull_request' || startsWith(github.ref, 'refs/heads/master/')
242242
steps:
243243
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
244244
uses: actions/checkout@v3
@@ -365,10 +365,10 @@ jobs:
365365
job_unit_test:
366366
name: Test (Node ${{ matrix.node }})
367367
needs: [job_get_metadata, job_build]
368-
continue-on-error: true
369368
timeout-minutes: 30
370369
runs-on: ubuntu-latest
371370
strategy:
371+
fail-fast: false
372372
matrix:
373373
node: [8, 10, 12, 14, 16, 18]
374374
steps:
@@ -403,10 +403,10 @@ jobs:
403403
name: Test @sentry/nextjs on (Node ${{ matrix.node }})
404404
needs: [job_get_metadata, job_build]
405405
# Currently always runs because it is required for merging PRs
406-
continue-on-error: true
407406
timeout-minutes: 30
408407
runs-on: ubuntu-latest
409408
strategy:
409+
fail-fast: false
410410
matrix:
411411
node: [10, 12, 14, 16, 18]
412412
steps:
@@ -441,10 +441,10 @@ jobs:
441441
name: Test @sentry/ember
442442
needs: [job_get_metadata, job_build]
443443
if: needs.job_get_metadata.outputs.changed_ember == 'true' || github.event_name != 'pull_request'
444-
continue-on-error: true
445444
timeout-minutes: 10
446445
runs-on: ubuntu-latest
447446
strategy:
447+
fail-fast: false
448448
matrix:
449449
scenario: [ember-release, embroider-optimized, ember-4.0]
450450
steps:
@@ -537,8 +537,8 @@ jobs:
537537
if: needs.job_get_metadata.outputs.changed_browser == 'true' || github.event_name != 'pull_request'
538538
runs-on: ubuntu-latest
539539
timeout-minutes: 10
540-
continue-on-error: true
541540
strategy:
541+
fail-fast: false
542542
matrix:
543543
browser:
544544
- ChromeHeadless
@@ -576,7 +576,6 @@ jobs:
576576
needs: [job_get_metadata, job_build]
577577
runs-on: ubuntu-latest
578578
timeout-minutes: 5
579-
continue-on-error: true
580579
steps:
581580
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
582581
uses: actions/checkout@v3
@@ -611,8 +610,8 @@ jobs:
611610
# Currently always runs because it is required for merging PRs
612611
runs-on: ubuntu-latest
613612
timeout-minutes: 10
614-
continue-on-error: true
615613
strategy:
614+
fail-fast: false
616615
matrix:
617616
node: [10, 12, 14, 16, 18]
618617
steps:
@@ -647,8 +646,8 @@ jobs:
647646
if: needs.job_get_metadata.outputs.changed_remix == 'true' || github.event_name != 'pull_request'
648647
runs-on: ubuntu-latest
649648
timeout-minutes: 10
650-
continue-on-error: true
651649
strategy:
650+
fail-fast: false
652651
matrix:
653652
node: [14, 16, 18]
654653
steps:
@@ -684,7 +683,6 @@ jobs:
684683
needs: [job_get_metadata, job_build]
685684
runs-on: ubuntu-latest
686685
timeout-minutes: 10
687-
continue-on-error: true
688686
steps:
689687
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
690688
uses: actions/checkout@v3
@@ -712,3 +710,24 @@ jobs:
712710
run: |
713711
cd packages/e2e-tests
714712
yarn test:e2e
713+
714+
job_required_tests:
715+
name: All required tests passed or skipped
716+
needs:
717+
[
718+
job_unit_test,
719+
job_nextjs_integration_test,
720+
job_node_integration_tests,
721+
job_browser_playwright_tests,
722+
job_browser_integration_tests,
723+
job_remix_integration_tests,
724+
job_ember_tests,
725+
]
726+
# Always run this, even if a dependent job failed
727+
if: always()
728+
runs-on: ubuntu-latest
729+
steps:
730+
- name: Check for failures
731+
if: contains(needs.*.result, 'failure')
732+
run: |
733+
echo "One of the dependent jobs have failed. You may need to re-run it." && exit 1

0 commit comments

Comments
 (0)