message: chore: fix up marking e2e tests as failed at the critical points
diff: @@ -64,6 +64,18 @@ jobs:
  - name: Build
  run: yarn --frozen-lockfile
  + - name: Mark end-to-end tests as failed
  + # For manual runs (e.g for fork PRs) don't update commit status as there won't be permissions to do so
  + if: ${{ failure() && github.event.inputs.pull_request_id == '' }}
  + uses: Sibz/github-status-action@v1
  + with:
  + authToken: ${{ secrets.GITHUB_TOKEN }}
  + context: "End-to-end Tests"
  + description: "End-to-end tests have failed"
  + state: "failure"
  + sha: ${{ needs.initialize.outputs.pr_git_sha || github.event.inputs.sha || github.sha }}
  + target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
  +
  - name: Install test utils
  run: |
  cd packages/e2e-tests/test-utils
  @@ -156,32 +168,31 @@ jobs:
  yarn e2e:ci
  timeout-minutes: 30 # In case something goes wrong
  - finalize:
  - if: always()
  - needs: [initialize, run-e2e-tests]
  - runs-on: [ubuntu-latest]
  -
  - steps:
  - - name: Mark end-to-end tests as succeeded
  + - name: Mark end-to-end tests as failed
  # For manual runs (e.g for fork PRs) don't update commit status as there won't be permissions to do so
  - if: ${{ success() && github.event.inputs.pull_request_id == '' }}
  + if: ${{ failure() && github.event.inputs.pull_request_id == '' }}
  uses: Sibz/github-status-action@v1
  with:
  authToken: ${{ secrets.GITHUB_TOKEN }}
  context: "End-to-end Tests"
  - description: "End-to-end tests have passed"
  - state: "success"
  + description: "End-to-end tests have failed"
  + state: "failure"
  sha: ${{ needs.initialize.outputs.pr_git_sha || github.event.inputs.sha || github.sha }}
  target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
  - - name: Mark end-to-end tests as failed
  + finalize:
  + needs: [initialize, run-e2e-tests]
  + runs-on: [ubuntu-latest]
  +
  + steps:
  + - name: Mark end-to-end tests as succeeded
  # For manual runs (e.g for fork PRs) don't update commit status as there won't be permissions to do so
  - if: ${{ failure() && github.event.inputs.pull_request_id == '' }}
  + if: ${{ github.event.inputs.pull_request_id == '' }}
  uses: Sibz/github-status-action@v1
  with:
  authToken: ${{ secrets.GITHUB_TOKEN }}
  context: "End-to-end Tests"
  - description: "End-to-end tests have failed"
  - state: "failure"
  + description: "End-to-end tests have passed"
  + state: "success"
  sha: ${{ needs.initialize.outputs.pr_git_sha || github.event.inputs.sha || github.sha }}
  target_url: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
  