diff --git a/.github/workflows/setup-tests-with-custom-base-port.yaml b/.github/workflows/setup-tests-with-custom-base-port.yaml index 95a04f289..846da8e8f 100644 --- a/.github/workflows/setup-tests-with-custom-base-port.yaml +++ b/.github/workflows/setup-tests-with-custom-base-port.yaml @@ -48,5 +48,12 @@ jobs: tail: true wait-for: 120s log-output-if: true - - name: Run tests + - name: Run tests (first attempt) + id: run-tests-first-attempt + continue-on-error: ${{ (github.head_ref || github.ref_name) != 'main' && (github.head_ref || github.ref_name) != 'dev' }} + run: pnpm run test run --reporter=verbose + + # These tests are often flakey, as a temporary measure we retry them once. + - name: Run tests (retry once on non-dev/main branches) + if: ${{ (github.head_ref || github.ref_name) != 'main' && (github.head_ref || github.ref_name) != 'dev' && steps.run-tests-first-attempt.outcome == 'failure' }} run: pnpm run test run --reporter=verbose diff --git a/.github/workflows/setup-tests.yaml b/.github/workflows/setup-tests.yaml index fe81c28ec..7abf3eadb 100644 --- a/.github/workflows/setup-tests.yaml +++ b/.github/workflows/setup-tests.yaml @@ -46,5 +46,12 @@ jobs: tail: true wait-for: 120s log-output-if: true - - name: Run tests + - name: Run tests (first attempt) + id: run-tests-first-attempt + continue-on-error: ${{ (github.head_ref || github.ref_name) != 'main' && (github.head_ref || github.ref_name) != 'dev' }} + run: pnpm run test run --reporter=verbose + + # These tests are often flakey, as a temporary measure we retry them once. + - name: Run tests (retry once on non-dev/main branches) + if: ${{ (github.head_ref || github.ref_name) != 'main' && (github.head_ref || github.ref_name) != 'dev' && steps.run-tests-first-attempt.outcome == 'failure' }} run: pnpm run test run --reporter=verbose