-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (50 loc) · 1.34 KB
/
test.yml
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
name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
name: Test
runs-on: ubuntu-20.04
strategy:
matrix:
python-version:
- "3.7.1"
- "3.8.0"
- "3.9.0"
- "3.10.0"
- "3.11.0"
postgresql-version:
- "postgres:9.6"
- "postgres:10.0"
- "postgres:11.0"
- "postgres:12.0"
- "postgres:13.0"
- "postgres:14.0"
- "postgres:15.0"
- "postgres:16beta2"
# sqlalchemy 1.4 doesn't support psycopg3
ci-extras:
- ci-psycopg2-sqlalchemy1
- ci-psycopg2-sqlalchemy2
- ci-psycopg3-sqlalchemy2
steps:
- name: "Checkout"
uses: "actions/checkout@v4"
- uses: "actions/setup-python@v4"
with:
python-version: '${{ matrix.python-version }}'
- name: "Run PostgreSQL"
run: |
./start-services.sh ${{ matrix.postgresql-version }}
- name: "Install package and python dependencies"
run: |
pip install .[ci,${{ matrix.ci-extras }}]
- name: "Wait for PostgreSQL"
run: "timeout 60 bash -c 'until echo > /dev/tcp/127.0.0.1/5432; do sleep 5; done'"
- name: "Test"
run: |
pytest --cov
- uses: codecov/codecov-action@v3