-
Notifications
You must be signed in to change notification settings - Fork 28
70 lines (60 loc) · 1.62 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Test
on:
- push
- pull_request
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ubuntu-latest
services:
postgres:
image: postgres:${{ matrix.postgresql-version }}
env:
POSTGRES_DB: postgresql_audit_test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
strategy:
fail-fast: false
matrix:
include:
- name: "Python 3.11"
python: "3.11"
postgresql-version: 12
tox: py-max
- name: "Python 3.10"
python: "3.10"
postgresql-version: 12
tox: py-max
- name: "Python 3.9"
python: "3.9"
postgresql-version: 12
tox: py-max
- name: "Python 3.8"
python: "3.8"
postgresql-version: 12
tox: py-max
- name: "Minimum versions"
python: "3.8"
postgresql-version: 11
tox: py-min
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade tox setuptools
- name: Run tests
env:
POSTGRESQL_AUDIT_TEST_PASSWORD: postgres
run: tox -e ${{ matrix.tox }}