-
Notifications
You must be signed in to change notification settings - Fork 10
executable file
·39 lines (38 loc) · 1.15 KB
/
postgres-tests.yml
File metadata and controls
executable file
·39 lines (38 loc) · 1.15 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
name: Postgres Tests
on:
push:
pull_request:
jobs:
postgres:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_DB: textgen
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U postgres" --health-interval=10s --health-timeout=5s --health-retries=5
steps:
- uses: actions/checkout@v4
- name: Setup sellerinfo
run: cp sellerinfo_faked.py sellerinfo.py
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install uv
run: pip install uv
- name: Install dependencies
run: |
uv pip install --system -r requirements.txt
uv pip install --system -r dev-requirements.txt
- name: Wait for Postgres
run: until pg_isready -h localhost -p 5432; do sleep 1; done
- name: Run tests
env:
DATABASE_URL: postgresql://postgres:password@localhost:5432/textgen
run: |
PYTHONPATH=. pytest tests/test_postgres_setup.py tests/test_frontend.py -q