-
Notifications
You must be signed in to change notification settings - Fork 19
42 lines (42 loc) · 1.16 KB
/
postgres.yaml
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
name: postgres
on:
pull_request:
push:
branches:
- master
paths:
- pyproject.toml
- poetry.lock
- "**.py"
jobs:
postgres-version:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
postgres-version: [13, 14, 15, 16, 17]
psycopg-version: ["psycopg", "psycopg2"]
services:
postgres:
image: postgres:${{ matrix.postgres-version }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: sandbox
ports:
- 5432:5432
options: --name postgres --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v3
- name: Install poetry
run: pipx install poetry
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install Dependencies
run: poetry install
- name: Install psycopg specific version ${{ matrix.psycopg-version }}
run: poetry run pip install ${{ matrix.psycopg-version }}
- name: Run Tests
run: poetry run pytest sandbox/tests