3a2cf14a68
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
59 lines
2.4 KiB
YAML
59 lines
2.4 KiB
YAML
# Triggers after the "Downstream artifacts" build has finished, to run the
|
|
# cypress tests (with access to repo secrets)
|
|
|
|
name: matrix-react-sdk Cypress End to End Tests
|
|
on:
|
|
workflow_run:
|
|
workflows: ["Build downstream artifacts"]
|
|
types:
|
|
- completed
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.run_id }}
|
|
cancel-in-progress: ${{ github.event.workflow_run.event == 'pull_request' }}
|
|
|
|
jobs:
|
|
cypress:
|
|
name: Cypress
|
|
|
|
# We only want to run the cypress tests on merge queue to prevent regressions
|
|
# from creeping in. They take a long time to run and consume 4 concurrent runners.
|
|
if: github.event.workflow_run.event == 'merge_group'
|
|
|
|
uses: matrix-org/matrix-react-sdk/.github/workflows/cypress.yaml@f6ef476f7905cc2b1f060f1a360b482e7546e682
|
|
permissions:
|
|
actions: read
|
|
issues: read
|
|
statuses: write
|
|
pull-requests: read
|
|
secrets:
|
|
# secrets are not automatically shared with called workflows, so share the cypress dashboard key, and the Kiwi login details
|
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
TCMS_USERNAME: ${{ secrets.TCMS_USERNAME }}
|
|
TCMS_PASSWORD: ${{ secrets.TCMS_PASSWORD }}
|
|
with:
|
|
react-sdk-repository: matrix-org/matrix-react-sdk
|
|
|
|
# We want to make the cypress tests 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.
|
|
mark_skipped:
|
|
if: github.event.workflow_run.event != 'merge_group'
|
|
permissions:
|
|
statuses: write
|
|
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: "${{ github.workflow }} / cypress"
|
|
sha: "${{ github.event.workflow_run.head_sha }}"
|