-
Notifications
You must be signed in to change notification settings - Fork 0
113 lines (90 loc) · 2.73 KB
/
Copy pathpython-ci.yaml
File metadata and controls
113 lines (90 loc) · 2.73 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
# .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"
strategy:
fail-fast: false
matrix:
python-version: ["3.11", "3.13"]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- 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