-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (48 loc) · 1.45 KB
/
Copy pathtests.yml
File metadata and controls
63 lines (48 loc) · 1.45 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
name: Tests
on:
pull_request:
workflow_call:
jobs:
pytest:
name: Pytest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v4
- name: Install dependencies
run: uv sync --extra dev --frozen
- name: Run non-Postgres tests
run: uv run pytest -m "not postgres" -v
pytest-postgres:
name: Pytest Postgres
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16
env:
POSTGRES_DB: omop_constructs_ci
POSTGRES_USER: omop_constructs
POSTGRES_PASSWORD: omop_constructs
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U omop_constructs -d omop_constructs_ci"
--health-interval 10s
--health-timeout 5s
--health-retries 5
env:
ENGINE_CDM: postgresql+psycopg://omop_constructs:omop_constructs@127.0.0.1:5432/omop_constructs_ci
ENGINE: postgresql+psycopg://omop_constructs:omop_constructs@127.0.0.1:5432/omop_constructs_ci
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
- uses: astral-sh/setup-uv@v4
- name: Install dependencies
run: uv sync --extra dev --frozen
- name: Run Postgres tests
run: uv run pytest -m postgres -v