build: add Cypress parallelization with obfuscated record key (#12534)

This commit is contained in:
Rob DiCiuccio 2021-01-15 12:18:18 -08:00 committed by GitHub
parent fc5e311842
commit b1fcd61b73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 3 deletions

View File

@ -164,9 +164,10 @@ cypress-run() {
export TERM="xterm"
say "::group::Run Cypress for [$page]"
if [[ -z $CYPRESS_RECORD_KEY ]]; then
if [[ -z $CYPRESS_KEY ]]; then
$cypress --spec "cypress/integration/$page" --browser "$browser"
else
export CYPRESS_RECORD_KEY=`echo $CYPRESS_KEY | base64 --decode`
# additional flags for Cypress dashboard recording
$cypress --spec "cypress/integration/$page" --browser "$browser" \
--record --group "$group" --tag "${GITHUB_REPOSITORY},${GITHUB_EVENT_NAME}" \

View File

@ -9,10 +9,16 @@ on:
pull_request:
jobs:
Cypress:
cypress-matrix:
runs-on: ubuntu-18.04
strategy:
# when one test fails, DO NOT cancel the other
# containers, because this will kill Cypress processes
# leaving the Dashboard hanging ...
# https://github.com/cypress-io/github-action/issues/48
fail-fast: false
matrix:
containers: [1, 2, 3]
browser: ["chrome"]
env:
FLASK_ENV: development
@ -87,7 +93,7 @@ jobs:
uses: ./.github/actions/cached-dependencies
env:
CYPRESS_BROWSER: ${{ matrix.browser }}
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
CYPRESS_KEY: YjljODE2MzAtODcwOC00NTA3LWE4NmMtMTU3YmFmMjIzOTRhCg==
with:
run: cypress-run-all
- name: Upload Artifacts
@ -96,3 +102,12 @@ jobs:
with:
name: screenshots
path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots
Cypress:
if: ${{ always() }}
name: Cypress (chrome)
runs-on: ubuntu-18.04
needs: cypress-matrix
steps:
- name: Check build matrix status
if: ${{ needs.cypress-matrix.result != 'success' }}
run: exit 1