Skip to content

Commit c46767f

Browse files
committed
Retry setup tests on non-staging branches to prevent flakeyness
1 parent f7c6e69 commit c46767f

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

.github/workflows/setup-tests-with-custom-base-port.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,5 +48,12 @@ jobs:
4848
tail: true
4949
wait-for: 120s
5050
log-output-if: true
51-
- name: Run tests
51+
- name: Run tests (first attempt)
52+
id: run-tests-first-attempt
53+
continue-on-error: ${{ (github.head_ref || github.ref_name) != 'main' && (github.head_ref || github.ref_name) != 'dev' }}
54+
run: pnpm run test run --reporter=verbose
55+
56+
# These tests are often flakey, as a temporary measure we retry them once.
57+
- name: Run tests (retry once on non-dev/main branches)
58+
if: ${{ (github.head_ref || github.ref_name) != 'main' && (github.head_ref || github.ref_name) != 'dev' && steps.run-tests-first-attempt.outcome == 'failure' }}
5259
run: pnpm run test run --reporter=verbose

.github/workflows/setup-tests.yaml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,12 @@ jobs:
4646
tail: true
4747
wait-for: 120s
4848
log-output-if: true
49-
- name: Run tests
49+
- name: Run tests (first attempt)
50+
id: run-tests-first-attempt
51+
continue-on-error: ${{ (github.head_ref || github.ref_name) != 'main' && (github.head_ref || github.ref_name) != 'dev' }}
52+
run: pnpm run test run --reporter=verbose
53+
54+
# These tests are often flakey, as a temporary measure we retry them once.
55+
- name: Run tests (retry once on non-dev/main branches)
56+
if: ${{ (github.head_ref || github.ref_name) != 'main' && (github.head_ref || github.ref_name) != 'dev' && steps.run-tests-first-attempt.outcome == 'failure' }}
5057
run: pnpm run test run --reporter=verbose

0 commit comments

Comments
 (0)