2020-04-14 16:38:09 -04:00
|
|
|
name: E2E
|
|
|
|
|
2021-01-07 03:47:00 -05:00
|
|
|
on:
|
|
|
|
push:
|
2024-01-23 23:30:53 -05:00
|
|
|
branches:
|
2024-03-06 12:23:07 -05:00
|
|
|
- "master"
|
|
|
|
- "[0-9].[0-9]"
|
2021-01-07 03:47:00 -05:00
|
|
|
pull_request:
|
2021-01-21 19:10:17 -05:00
|
|
|
types: [synchronize, opened, reopened, ready_for_review]
|
2020-04-14 16:38:09 -04:00
|
|
|
|
2024-01-31 02:03:25 -05:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2020-04-14 16:38:09 -04:00
|
|
|
jobs:
|
2021-01-15 15:18:18 -05:00
|
|
|
cypress-matrix:
|
2021-01-15 19:14:33 -05:00
|
|
|
runs-on: ubuntu-20.04
|
2023-04-14 11:23:00 -04:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
pull-requests: read
|
2020-04-14 16:38:09 -04:00
|
|
|
strategy:
|
2021-01-15 15:18:18 -05:00
|
|
|
# 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
|
2020-04-14 16:38:09 -04:00
|
|
|
matrix:
|
2021-01-15 15:18:18 -05:00
|
|
|
containers: [1, 2, 3]
|
2020-12-08 18:27:08 -05:00
|
|
|
browser: ["chrome"]
|
2020-04-14 16:38:09 -04:00
|
|
|
env:
|
2023-06-29 15:04:32 -04:00
|
|
|
SUPERSET_ENV: development
|
2021-07-01 11:03:07 -04:00
|
|
|
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
|
2020-08-27 12:38:12 -04:00
|
|
|
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
|
2020-04-14 16:38:09 -04:00
|
|
|
PYTHONPATH: ${{ github.workspace }}
|
|
|
|
REDIS_PORT: 16379
|
2023-04-14 11:23:00 -04:00
|
|
|
GITHUB_TOKEN: ${{ github.token }}
|
2020-04-14 16:38:09 -04:00
|
|
|
services:
|
|
|
|
postgres:
|
2023-07-24 13:09:41 -04:00
|
|
|
image: postgres:15-alpine
|
2020-04-14 16:38:09 -04:00
|
|
|
env:
|
|
|
|
POSTGRES_USER: superset
|
|
|
|
POSTGRES_PASSWORD: superset
|
|
|
|
ports:
|
|
|
|
- 15432:5432
|
|
|
|
redis:
|
2023-01-16 10:45:32 -05:00
|
|
|
image: redis:7-alpine
|
2020-04-14 16:38:09 -04:00
|
|
|
ports:
|
|
|
|
- 16379:6379
|
|
|
|
steps:
|
2021-01-24 02:10:16 -05:00
|
|
|
- name: "Checkout (pull) ${{ github.ref }} ( ${{ github.sha }} )"
|
2024-02-01 13:56:33 -05:00
|
|
|
uses: actions/checkout@v4
|
2020-12-16 13:45:21 -05:00
|
|
|
if: github.event_name == 'push'
|
2021-01-24 02:10:16 -05:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
submodules: recursive
|
|
|
|
- name: "Checkout (pull_request) ${{ github.ref }} ( ${{ github.sha }} )"
|
2024-02-01 13:56:33 -05:00
|
|
|
uses: actions/checkout@v4
|
2020-12-16 13:45:21 -05:00
|
|
|
if: github.event_name == 'pull_request' || github.event_name == 'pull_request_target'
|
|
|
|
with:
|
2021-01-05 18:46:52 -05:00
|
|
|
ref: "refs/pull/${{ github.event.number }}/merge"
|
2021-01-24 02:10:16 -05:00
|
|
|
persist-credentials: false
|
|
|
|
submodules: recursive
|
2021-02-09 06:58:50 -05:00
|
|
|
- name: Check if python or frontend changes are present
|
|
|
|
id: check
|
|
|
|
env:
|
|
|
|
GITHUB_REPO: ${{ github.repository }}
|
|
|
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
|
|
continue-on-error: true
|
|
|
|
run: ./scripts/ci_check_no_file_changes.sh python frontend
|
2020-12-08 18:27:08 -05:00
|
|
|
- name: Setup Python
|
2021-02-09 06:58:50 -05:00
|
|
|
if: steps.check.outcome == 'failure'
|
2024-02-01 13:20:24 -05:00
|
|
|
uses: actions/setup-python@v5
|
2020-12-08 18:27:08 -05:00
|
|
|
with:
|
2023-05-10 13:21:56 -04:00
|
|
|
python-version: "3.9"
|
2020-12-08 18:27:08 -05:00
|
|
|
- name: OS dependencies
|
2021-02-09 06:58:50 -05:00
|
|
|
if: steps.check.outcome == 'failure'
|
2021-01-04 07:16:07 -05:00
|
|
|
uses: ./.github/actions/cached-dependencies
|
2020-12-08 18:27:08 -05:00
|
|
|
with:
|
2021-09-25 01:26:35 -04:00
|
|
|
run: apt-get-install
|
2020-12-08 18:27:08 -05:00
|
|
|
- name: Install python dependencies
|
2021-02-09 06:58:50 -05:00
|
|
|
if: steps.check.outcome == 'failure'
|
2021-01-04 07:16:07 -05:00
|
|
|
uses: ./.github/actions/cached-dependencies
|
2020-12-08 18:27:08 -05:00
|
|
|
with:
|
|
|
|
run: |
|
|
|
|
pip-upgrade
|
|
|
|
pip install -r requirements/testing.txt
|
|
|
|
- name: Setup postgres
|
2021-02-09 06:58:50 -05:00
|
|
|
if: steps.check.outcome == 'failure'
|
2021-01-04 07:16:07 -05:00
|
|
|
uses: ./.github/actions/cached-dependencies
|
2020-12-08 18:27:08 -05:00
|
|
|
with:
|
2021-09-25 01:26:35 -04:00
|
|
|
run: setup-postgres
|
2020-12-08 18:27:08 -05:00
|
|
|
- name: Import test data
|
2021-02-09 06:58:50 -05:00
|
|
|
if: steps.check.outcome == 'failure'
|
2021-01-04 07:16:07 -05:00
|
|
|
uses: ./.github/actions/cached-dependencies
|
2020-12-08 18:27:08 -05:00
|
|
|
with:
|
2021-09-25 01:26:35 -04:00
|
|
|
run: testdata
|
|
|
|
- name: Setup Node.js
|
2024-02-01 10:06:48 -05:00
|
|
|
uses: actions/setup-node@v4
|
2021-09-25 01:26:35 -04:00
|
|
|
with:
|
2022-05-09 09:42:20 -04:00
|
|
|
node-version: "16"
|
2020-12-08 18:27:08 -05:00
|
|
|
- name: Install npm dependencies
|
2021-02-09 06:58:50 -05:00
|
|
|
if: steps.check.outcome == 'failure'
|
2021-01-04 07:16:07 -05:00
|
|
|
uses: ./.github/actions/cached-dependencies
|
2020-12-08 18:27:08 -05:00
|
|
|
with:
|
2021-09-25 01:26:35 -04:00
|
|
|
run: npm-install
|
2020-12-08 18:27:08 -05:00
|
|
|
- name: Build javascript packages
|
2021-02-09 06:58:50 -05:00
|
|
|
if: steps.check.outcome == 'failure'
|
2021-01-04 07:16:07 -05:00
|
|
|
uses: ./.github/actions/cached-dependencies
|
2020-12-08 18:27:08 -05:00
|
|
|
with:
|
2021-09-25 01:26:35 -04:00
|
|
|
run: build-instrumented-assets
|
2020-12-08 18:27:08 -05:00
|
|
|
- name: Install cypress
|
2021-02-09 06:58:50 -05:00
|
|
|
if: steps.check.outcome == 'failure'
|
2021-01-04 07:16:07 -05:00
|
|
|
uses: ./.github/actions/cached-dependencies
|
2020-12-08 18:27:08 -05:00
|
|
|
with:
|
2021-09-25 01:26:35 -04:00
|
|
|
run: cypress-install
|
2020-12-08 18:27:08 -05:00
|
|
|
- name: Run Cypress
|
2021-02-09 06:58:50 -05:00
|
|
|
if: steps.check.outcome == 'failure'
|
2021-01-04 07:16:07 -05:00
|
|
|
uses: ./.github/actions/cached-dependencies
|
2020-12-08 18:27:08 -05:00
|
|
|
env:
|
|
|
|
CYPRESS_BROWSER: ${{ matrix.browser }}
|
2021-01-15 15:18:18 -05:00
|
|
|
CYPRESS_KEY: YjljODE2MzAtODcwOC00NTA3LWE4NmMtMTU3YmFmMjIzOTRhCg==
|
2020-12-08 18:27:08 -05:00
|
|
|
with:
|
|
|
|
run: cypress-run-all
|
|
|
|
- name: Upload Artifacts
|
2024-01-31 17:22:01 -05:00
|
|
|
uses: actions/upload-artifact@v4
|
2020-12-08 18:27:08 -05:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: screenshots
|
|
|
|
path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots
|