2022-05-13 20:31:23 -04:00
|
|
|
name: Superset CLI tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
2024-01-23 23:30:53 -05:00
|
|
|
branches:
|
2024-03-06 12:23:07 -05:00
|
|
|
- "master"
|
2024-06-17 16:42:58 -04:00
|
|
|
- "[0-9].[0-9]*"
|
2022-05-13 20:31:23 -04:00
|
|
|
pull_request:
|
|
|
|
types: [synchronize, opened, reopened, ready_for_review]
|
|
|
|
|
2024-02-01 10:08:41 -05:00
|
|
|
# cancel previous workflow jobs for PRs
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-05-13 20:31:23 -04:00
|
|
|
jobs:
|
|
|
|
test-load-examples:
|
|
|
|
runs-on: ubuntu-20.04
|
|
|
|
env:
|
|
|
|
PYTHONPATH: ${{ github.workspace }}
|
|
|
|
SUPERSET_CONFIG: tests.integration_tests.superset_test_config
|
|
|
|
REDIS_PORT: 16379
|
|
|
|
SUPERSET__SQLALCHEMY_DATABASE_URI: postgresql+psycopg2://superset:superset@127.0.0.1:15432/superset
|
|
|
|
services:
|
|
|
|
postgres:
|
2023-07-24 13:09:41 -04:00
|
|
|
image: postgres:15-alpine
|
2022-05-13 20:31:23 -04:00
|
|
|
env:
|
|
|
|
POSTGRES_USER: superset
|
|
|
|
POSTGRES_PASSWORD: superset
|
|
|
|
ports:
|
|
|
|
# Use custom ports for services to avoid accidentally connecting to
|
|
|
|
# GitHub action runner's default installations
|
|
|
|
- 15432:5432
|
|
|
|
redis:
|
2023-01-16 10:45:32 -05:00
|
|
|
image: redis:7-alpine
|
2022-05-13 20:31:23 -04:00
|
|
|
ports:
|
|
|
|
- 16379:6379
|
|
|
|
steps:
|
|
|
|
- name: "Checkout ${{ github.ref }} ( ${{ github.sha }} )"
|
2024-02-01 13:56:33 -05:00
|
|
|
uses: actions/checkout@v4
|
2022-05-13 20:31:23 -04:00
|
|
|
with:
|
|
|
|
persist-credentials: false
|
|
|
|
submodules: recursive
|
2024-04-08 19:20:25 -04:00
|
|
|
- name: Check for file changes
|
2022-05-13 20:31:23 -04:00
|
|
|
id: check
|
2024-04-08 19:20:25 -04:00
|
|
|
uses: ./.github/actions/change-detector/
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2022-05-13 20:31:23 -04:00
|
|
|
- name: Setup Python
|
2024-04-08 19:20:25 -04:00
|
|
|
if: steps.check.outputs.python
|
2024-03-18 21:39:41 -04:00
|
|
|
uses: ./.github/actions/setup-backend/
|
|
|
|
- name: Setup Postgres
|
2024-04-08 19:20:25 -04:00
|
|
|
if: steps.check.outputs.python
|
2022-05-13 20:31:23 -04:00
|
|
|
uses: ./.github/actions/cached-dependencies
|
|
|
|
with:
|
2024-03-18 21:39:41 -04:00
|
|
|
run: setup-postgres
|
2022-05-13 20:31:23 -04:00
|
|
|
- name: superset init
|
2024-04-08 19:20:25 -04:00
|
|
|
if: steps.check.outputs.python
|
2022-05-13 20:31:23 -04:00
|
|
|
run: |
|
|
|
|
pip install -e .
|
|
|
|
superset db upgrade
|
|
|
|
superset load_test_users
|
|
|
|
- name: superset load_examples
|
2024-04-08 19:20:25 -04:00
|
|
|
if: steps.check.outputs.python
|
2022-05-13 20:31:23 -04:00
|
|
|
run: |
|
|
|
|
# load examples without test data
|
|
|
|
superset load_examples --load-big-data
|