diff --git a/.asf.yaml b/.asf.yaml index 14f02fb18ec43..ea63dc5e61351 100644 --- a/.asf.yaml +++ b/.asf.yaml @@ -63,9 +63,12 @@ github: # combination here. contexts: - lint-check + - cypress-matrix (0, chrome) - cypress-matrix (1, chrome) - cypress-matrix (2, chrome) - cypress-matrix (3, chrome) + - cypress-matrix (4, chrome) + - cypress-matrix (5, chrome) - frontend-build - pre-commit - python-lint diff --git a/.github/workflows/superset-e2e.yml b/.github/workflows/superset-e2e.yml index d8a10f949f444..7a9403fc849d2 100644 --- a/.github/workflows/superset-e2e.yml +++ b/.github/workflows/superset-e2e.yml @@ -130,12 +130,12 @@ jobs: CYPRESS_BROWSER: ${{ matrix.browser }} PARALLEL_ID: ${{ matrix.parallel_id }} PARALLELISM: 6 - CYPRESS_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} + CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }} with: run: cypress-run-all ${{ env.USE_DASHBOARD }} - name: Upload Artifacts uses: actions/upload-artifact@v4 if: github.event_name == 'workflow_dispatch' && (steps.check.outputs.python || steps.check.outputs.frontend) with: - name: screenshots path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots + name: cypress-artifact-${{ github.run_id }}-${{ github.job }} diff --git a/scripts/cypress_run.py b/scripts/cypress_run.py index a04fb861fdd6d..1154a3661dda3 100644 --- a/scripts/cypress_run.py +++ b/scripts/cypress_run.py @@ -24,6 +24,7 @@ XVFB_PRE_CMD = "xvfb-run --auto-servernum --server-args='-screen 0, 1024x768x24' " REPO = os.getenv("GITHUB_REPOSITORY") or "apache/superset" GITHUB_EVENT_NAME = os.getenv("GITHUB_REPOSITORY") or "push" +CYPRESS_RECORD_KEY = os.getenv("CYPRESS_RECORD_KEY") or "" def compute_hash(file_path: str) -> str: @@ -55,13 +56,7 @@ def get_cypress_cmd( if use_dashboard: # Run using cypress.io service - cypress_key = os.getenv("CYPRESS_KEY") - command = f"echo {cypress_key} | base64 --decode" - cypress_record_key = ( - subprocess.check_output(command, shell=True).decode("utf-8").strip() - ) - os.environ["CYPRESS_RECORD_KEY"] = cypress_record_key - spec: str = "*/**/*" + spec: str = "cypress/e2e/*/**/*" cmd = ( f"{XVFB_PRE_CMD} " f'{cypress_cmd} --spec "{spec}" --browser {browser} ' @@ -70,7 +65,7 @@ def get_cypress_cmd( ) else: # Run local, but split the execution - os.environ.pop("CYPRESS_KEY", None) + os.environ.pop("CYPRESS_RECORD_KEY", None) spec_list_str = ",".join(sorted(spec_list)) if _filter: spec_list_str = ",".join(sorted([s for s in spec_list if _filter in s]))