Merge pull request #3519 from aloisklink/ci/fix-e2e-when-running-from-fork

ci(e2e): fix e2e action when running from fork
This commit is contained in:
Sidharth Vinod 2022-09-26 07:57:11 +05:30 committed by GitHub
commit 696164c9a6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 2 deletions

View File

@ -37,11 +37,16 @@ jobs:
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v3
# If CYPRESS_RECORD_KEY is set, run in parallel on all containers
# Otherwise (e.g. if running from fork), we run on a single container only
if: ${{ ( env.CYPRESS_RECORD_KEY != '' ) || ( matrix.containers == 1 ) }}
with:
start: yarn dev
wait-on: 'http://localhost:9000'
record: true
# Disable recording if we don't have an API key
# e.g. if this action was run from a fork
record: ${{ secrets.CYPRESS_RECORD_KEY != '' }}
parallel: ${{ secrets.CYPRESS_RECORD_KEY != '' }}
headless: true
parallel: true
env:
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}