forked from nycdb/nycdb
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (42 loc) · 1.33 KB
/
python-tests.yml
File metadata and controls
48 lines (42 loc) · 1.33 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
name: Python Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
python_tests:
strategy:
matrix:
include:
- python_version: 3.12-rc-bullseye
postgres_version: 15
- python_version: 3.11-bullseye
postgres_version: 15
- python_version: 3.11-bullseye
postgres_version: 14
- python_version: 3.10-bullseye
postgres_version: 14
- python_version: 3.10-bullseye
postgres_version: 13
- python_version: 3.10-bullseye
postgres_version: 12
- python_version: 3.9-bullseye
postgres_version: 14
- python_version: 3.8-bullseye
postgres_version: 14
runs-on: ubuntu-latest
env:
POSTGRES_VERSION: ${{ matrix.postgres_version }}
PYTHON_VERSION: ${{ matrix.python_version }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build containers
run: docker compose build
- name: Start Postgres
run: docker compose up -d db
- name: Wait for postgres
run: docker compose exec db /usr/bin/timeout 30 bash -c 'until pg_isready; do sleep 1; done'
- name: Run tests
run: docker compose run --env "NYCDB_TEST_POSTGRES_DB=nycdb" --entrypoint="pytest tests" nycdb