Add Superset integration CI job #55
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # .github/workflows/python-ci.yml | |
| name: Python CI | |
| on: | |
| push: | |
| branches: [ "main", "dev" ] | |
| pull_request: | |
| branches: [ "main", "dev" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| DATASTORE_EMULATOR_HOST: "localhost:8081" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.13' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Set up Java (required for Datastore emulator) | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '21' | |
| - name: 'Set up Cloud SDK' | |
| uses: 'google-github-actions/setup-gcloud@v2' | |
| with: | |
| install_components: 'beta,cloud-datastore-emulator' | |
| - name: 'Verify gcloud setup' | |
| run: | | |
| gcloud --version | |
| which gcloud | |
| gcloud components list --filter="id:cloud-datastore-emulator" --format="table(id,state.name)" | |
| - name: 'Configure gcloud project' | |
| run: 'gcloud config set project python-datastore-sqlalchemy' | |
| - name: Install dependencies | |
| run: uv sync --locked | |
| - name: Run tests | |
| run: uv run pytest | |
| superset-integration: | |
| runs-on: ubuntu-latest | |
| env: | |
| SUPERSET_CONFIG: tests.integration_tests.superset_test_config | |
| SUPERSET_TESTENV: "true" | |
| steps: | |
| - name: Checkout package | |
| uses: actions/checkout@v4 | |
| with: | |
| path: python-datastore-sqlalchemy | |
| - name: Checkout Superset | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: apache/superset | |
| ref: master | |
| path: superset | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| - name: Install Superset system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libldap2-dev libsasl2-dev libssl-dev | |
| - name: Install Superset dependencies | |
| working-directory: superset | |
| run: | | |
| uv venv .venv --python 3.11 | |
| uv pip install -r requirements/development.txt | |
| uv pip install -e ../python-datastore-sqlalchemy | |
| - name: Initialize Superset test database | |
| working-directory: superset | |
| run: | | |
| .venv/bin/superset db upgrade | |
| .venv/bin/superset init | |
| .venv/bin/superset load-test-users | |
| - name: Run Superset datastore integration tests | |
| working-directory: superset | |
| run: .venv/bin/pytest -vv tests/integration_tests/db_engine_specs/datastore_tests.py |