diff --git a/.github/workflows/cypress.yml b/.github/workflows/cypress.yml index e23cfd47b12..8d7cc70ca68 100644 --- a/.github/workflows/cypress.yml +++ b/.github/workflows/cypress.yml @@ -28,6 +28,7 @@ jobs: cache: 'yarn' - name: Cypress run + id: cypress-1 uses: cypress-io/github-action@v5 with: working-directory: dotcom-rendering @@ -35,3 +36,30 @@ jobs: wait-on-timeout: 30 browser: chrome spec: cypress/e2e/parallel-${{ matrix.group }}/*.js + + - name: Cypress run 2 + id: cypress-2 + # A default + if: ${failure() && steps.cypress-1.conclusion == 'failure'}} + uses: cypress-io/github-action@v5 + with: + working-directory: dotcom-rendering + wait-on: "http://localhost:9000" + wait-on-timeout: 30 + browser: chrome + spec: cypress/e2e/parallel-${{ matrix.group }}/*.js + + - name: Cypress run 3 + id: cypress-3 + if: ${{failure() && steps.cypress-2.conclusion == 'failure'}} + uses: cypress-io/github-action@v5 + with: + working-directory: dotcom-rendering + wait-on: "http://localhost:9000" + wait-on-timeout: 30 + browser: chrome + spec: cypress/e2e/parallel-${{ matrix.group }}/*.js + + - name: Did any cypress run pass? + if: ${{failure() && steps.cypress-1.conclusion == 'failure' && steps.cypress-2.conclusion == 'failure' && steps.cypress-3.conclusion == 'failure'}} + run: exit 1