Skip to content

Commit

Permalink
Add github action to mark cypress tests skipped (#3744)
Browse files Browse the repository at this point in the history
  • Loading branch information
richvdh authored Sep 22, 2023
1 parent 4947a0c commit 407ec4d
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/cypress-skipped.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# We only want to run the cypress tests in the merge queue (to save CI time),
# but we do want to make it a required check for the merge queue.
#
# Unfortunately, github doesn't distinguish between "checks needed for branch
# protection" (ie, the things that must pass before the PR will even be added
# to the merge queue) and "checks needed in the merge queue". We just have to add
# the check to the branch protection list.
#
# Ergo, if we know we're not going to run the cypress tests, we need to add a
# passing status check manually.

name: Mark cypress skipped
on:
pull_request: {}
permissions:
statuses: write
jobs:
mark_skipped:
runs-on: ubuntu-latest
steps:
- uses: Sibz/github-status-action@650dd1a882a76dbbbc4576fb5974b8d22f29847f # v1.1.6
with:
authToken: "${{ secrets.GITHUB_TOKEN }}"
state: success
description: Cypress skipped
context: "matrix-react-sdk Cypress End to End Tests / cypress"
sha: "${{ github.event.pull_request.head.sha }}"
# link to this file
target_url: "${{ github.event.pull_request.head.repo.html_url }}/blob/${{ github.event.pull_request.head.ref }}/.github/workflows/cypress-skipped.yml"

0 comments on commit 407ec4d

Please sign in to comment.