-
-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add github action to mark cypress tests skipped (#3744)
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" |