-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (61 loc) · 2 KB
/
Copy pathdialect-postgresql.yml
File metadata and controls
70 lines (61 loc) · 2 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
name: "PostgreSQL dialect tests"
on:
workflow_call:
jobs:
dialect-postgresql-tests:
name: Dialect tests (PostgreSQL)
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python_version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
postgres_version: ["14", "15", "16", "17", "18"]
drivername:
- "postgresql+psycopg"
- "postgresql+psycopg2"
- "postgresql+pg8000"
- "postgresql+psycopg2cffi"
- "postgresql+asyncpg"
include:
- drivername: "postgresql+psycopg"
project_directory: example_project
- drivername: "postgresql+psycopg2"
project_directory: example_project
- drivername: "postgresql+pg8000"
project_directory: example_project
- drivername: "postgresql+psycopg2cffi"
project_directory: example_project
- drivername: "postgresql+asyncpg"
project_directory: example_project_async
services:
postgres:
image: postgres:${{ matrix.postgres_version }}
env:
POSTGRES_USER: ci
POSTGRES_PASSWORD: password
POSTGRES_DB: example
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
UV_PYTHON: ${{ matrix.python_version }}
DATABASE_URL: ${{ matrix.drivername }}://ci:password@localhost:5432/example
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python_version }}
- name: Install uv
uses: astral-sh/setup-uv@v8.2.0
with:
enable-cache: true
cache-suffix: postgres-${{ matrix.python_version }}
- name: Run example project tests
working-directory: ${{ matrix.project_directory }}
run: uv run --extra postgres pytest