-
Notifications
You must be signed in to change notification settings - Fork 15
43 lines (40 loc) · 1021 Bytes
/
check.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
name: check
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
test:
name: test ${{ matrix.py }} on postgres ${{ matrix.postgres-version }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
postgres-version:
- 12
- 13
- 14
- 15
steps:
- name: Setup python for test ${{ matrix.py }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.py }}
- uses: actions/checkout@v4
- name: Create database
run: |
# maps the container port to localhost
docker run --name db -p 5432:5432 -d -e POSTGRES_PASSWORD=postgres postgres:${{ matrix.postgres-version }}
sleep 10 # wait for server to initialize
- name: Install tox-gh
run: python -m pip install tox-gh
- name: Run test suite
run: tox