mirror of
https://github.com/apache/superset.git
synced 2026-04-19 16:14:52 +00:00
build: add Cypress parallelization with obfuscated record key (#12534)
This commit is contained in:
3
.github/workflows/bashlib.sh
vendored
3
.github/workflows/bashlib.sh
vendored
@@ -164,9 +164,10 @@ cypress-run() {
|
|||||||
export TERM="xterm"
|
export TERM="xterm"
|
||||||
|
|
||||||
say "::group::Run Cypress for [$page]"
|
say "::group::Run Cypress for [$page]"
|
||||||
if [[ -z $CYPRESS_RECORD_KEY ]]; then
|
if [[ -z $CYPRESS_KEY ]]; then
|
||||||
$cypress --spec "cypress/integration/$page" --browser "$browser"
|
$cypress --spec "cypress/integration/$page" --browser "$browser"
|
||||||
else
|
else
|
||||||
|
export CYPRESS_RECORD_KEY=`echo $CYPRESS_KEY | base64 --decode`
|
||||||
# additional flags for Cypress dashboard recording
|
# additional flags for Cypress dashboard recording
|
||||||
$cypress --spec "cypress/integration/$page" --browser "$browser" \
|
$cypress --spec "cypress/integration/$page" --browser "$browser" \
|
||||||
--record --group "$group" --tag "${GITHUB_REPOSITORY},${GITHUB_EVENT_NAME}" \
|
--record --group "$group" --tag "${GITHUB_REPOSITORY},${GITHUB_EVENT_NAME}" \
|
||||||
|
|||||||
19
.github/workflows/superset-e2e.yml
vendored
19
.github/workflows/superset-e2e.yml
vendored
@@ -9,10 +9,16 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Cypress:
|
cypress-matrix:
|
||||||
runs-on: ubuntu-18.04
|
runs-on: ubuntu-18.04
|
||||||
strategy:
|
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:
|
matrix:
|
||||||
|
containers: [1, 2, 3]
|
||||||
browser: ["chrome"]
|
browser: ["chrome"]
|
||||||
env:
|
env:
|
||||||
FLASK_ENV: development
|
FLASK_ENV: development
|
||||||
@@ -87,7 +93,7 @@ jobs:
|
|||||||
uses: ./.github/actions/cached-dependencies
|
uses: ./.github/actions/cached-dependencies
|
||||||
env:
|
env:
|
||||||
CYPRESS_BROWSER: ${{ matrix.browser }}
|
CYPRESS_BROWSER: ${{ matrix.browser }}
|
||||||
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
CYPRESS_KEY: YjljODE2MzAtODcwOC00NTA3LWE4NmMtMTU3YmFmMjIzOTRhCg==
|
||||||
with:
|
with:
|
||||||
run: cypress-run-all
|
run: cypress-run-all
|
||||||
- name: Upload Artifacts
|
- name: Upload Artifacts
|
||||||
@@ -96,3 +102,12 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: screenshots
|
name: screenshots
|
||||||
path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/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
|
||||||
|
|||||||
Reference in New Issue
Block a user