2020-04-14 16:38:09 -04:00
|
|
|
name: E2E
|
|
|
|
|
2020-10-06 16:51:40 -04:00
|
|
|
on: [push, pull_request]
|
2020-04-14 16:38:09 -04:00
|
|
|
|
|
|
|
jobs:
|
2020-09-10 16:12:00 -04:00
|
|
|
Cypress:
|
2020-04-14 16:38:09 -04:00
|
|
|
runs-on: ubuntu-18.04
|
|
|
|
strategy:
|
2020-04-17 02:35:01 -04:00
|
|
|
fail-fast: true
|
2020-04-14 16:38:09 -04:00
|
|
|
matrix:
|
|
|
|
browser: ['chrome']
|
|
|
|
env:
|
|
|
|
FLASK_ENV: development
|
2020-08-27 12:38:12 -04:00
|
|
|
ENABLE_REACT_CRUD_VIEWS: true
|
2020-04-14 16:38:09 -04:00
|
|
|
SUPERSET_CONFIG: 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
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
services:
|
|
|
|
postgres:
|
|
|
|
image: postgres:10-alpine
|
|
|
|
env:
|
|
|
|
POSTGRES_USER: superset
|
|
|
|
POSTGRES_PASSWORD: superset
|
|
|
|
ports:
|
|
|
|
- 15432:5432
|
|
|
|
redis:
|
|
|
|
image: redis:5-alpine
|
|
|
|
ports:
|
|
|
|
- 16379:6379
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Setup Python
|
2020-11-11 16:15:05 -05:00
|
|
|
uses: actions/setup-python@v2
|
2020-04-14 16:38:09 -04:00
|
|
|
with:
|
2020-08-05 06:29:07 -04:00
|
|
|
python-version: '3.7'
|
2020-08-29 21:09:47 -04:00
|
|
|
- name: OS dependencies
|
2020-07-31 01:28:56 -04:00
|
|
|
uses: apache-superset/cached-dependencies@b90713b
|
2020-04-14 16:38:09 -04:00
|
|
|
with:
|
|
|
|
run: |
|
2020-08-04 22:31:52 -04:00
|
|
|
apt-get-install
|
2020-08-29 21:09:47 -04:00
|
|
|
- name: Install python dependencies
|
|
|
|
uses: apache-superset/cached-dependencies@b90713b
|
|
|
|
with:
|
|
|
|
run: |
|
2020-08-04 22:31:52 -04:00
|
|
|
pip-upgrade
|
|
|
|
pip install -r requirements/testing.txt
|
2020-08-29 21:09:47 -04:00
|
|
|
- name: Setup postgres
|
|
|
|
uses: apache-superset/cached-dependencies@b90713b
|
|
|
|
with:
|
|
|
|
run: |
|
2020-08-04 22:31:52 -04:00
|
|
|
setup-postgres
|
2020-08-29 21:09:47 -04:00
|
|
|
- name: Import test data
|
|
|
|
uses: apache-superset/cached-dependencies@b90713b
|
|
|
|
with:
|
|
|
|
run: |
|
2020-08-04 22:31:52 -04:00
|
|
|
testdata
|
2020-08-29 21:09:47 -04:00
|
|
|
- name: Install npm dependencies
|
|
|
|
uses: apache-superset/cached-dependencies@b90713b
|
|
|
|
with:
|
|
|
|
run: |
|
2020-08-04 22:31:52 -04:00
|
|
|
npm-install
|
2020-08-29 21:09:47 -04:00
|
|
|
- name: Build javascript packages
|
|
|
|
uses: apache-superset/cached-dependencies@b90713b
|
|
|
|
with:
|
|
|
|
run: |
|
2020-08-04 22:31:52 -04:00
|
|
|
build-instrumented-assets
|
2020-08-29 21:09:47 -04:00
|
|
|
- name: Install cypress
|
|
|
|
uses: apache-superset/cached-dependencies@b90713b
|
|
|
|
with:
|
|
|
|
run: |
|
2020-04-14 16:38:09 -04:00
|
|
|
cypress-install
|
2020-04-17 02:35:01 -04:00
|
|
|
- name: Run Cypress
|
2020-07-31 01:28:56 -04:00
|
|
|
uses: apache-superset/cached-dependencies@b90713b
|
2020-04-14 16:38:09 -04:00
|
|
|
env:
|
2020-04-17 02:35:01 -04:00
|
|
|
CYPRESS_BROWSER: ${{ matrix.browser }}
|
|
|
|
CYPRESS_RECORD_KEY: ${{ secrets.CYPRESS_RECORD_KEY }}
|
|
|
|
with:
|
|
|
|
run: cypress-run-all
|
2020-11-10 15:42:54 -05:00
|
|
|
- name: Upload Artifacts
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: screenshots
|
|
|
|
path: ${{ github.workspace }}/superset-frontend/cypress-base/cypress/screenshots
|