-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (63 loc) · 1.91 KB
/
Copy pathci.yml
File metadata and controls
66 lines (63 loc) · 1.91 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
# .github/workflows/ci.yml
name: ci
on:
push: { branches: [main] }
pull_request:
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- run: uv sync --dev
- run: uv run ruff check .
- run: uv run ruff format --check .
- run: uv run ty check
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12", "3.13"]
services:
pg:
image: timescale/timescaledb-ha:pg17-ts2.25
env:
POSTGRES_USER: sqlpush
POSTGRES_PASSWORD: sqlpush
POSTGRES_DB: sqlpush_test
ports: ["5432:5432"]
options: >-
--health-cmd "pg_isready -U sqlpush"
--health-interval 5s --health-timeout 5s --health-retries 10
env:
SQLPUSH_TEST_DSN: postgresql+psycopg://sqlpush:sqlpush@localhost:5432/sqlpush_test
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with: { python-version: "${{ matrix.python-version }}" }
- run: uv sync --dev
- run: uv run pytest -v
alembic-compat:
runs-on: ubuntu-latest
strategy:
matrix:
alembic: ["1.18.*", "1.19.*"]
services:
pg:
image: timescale/timescaledb-ha:pg17-ts2.25
env:
POSTGRES_USER: sqlpush
POSTGRES_PASSWORD: sqlpush
POSTGRES_DB: sqlpush_test
ports: ["5432:5432"]
options: >-
--health-cmd "pg_isready -U sqlpush"
--health-interval 5s --health-timeout 5s --health-retries 10
env:
SQLPUSH_TEST_DSN: postgresql+psycopg://sqlpush:sqlpush@localhost:5432/sqlpush_test
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- run: uv sync --dev && uv pip install "alembic==${{ matrix.alembic }}"
- run: uv run --no-sync pytest tests/test_diff.py tests/test_api.py -v