-
Notifications
You must be signed in to change notification settings - Fork 18
48 lines (48 loc) · 1.36 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
43
44
45
46
47
48
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:
python-version: ["3.x"]
postgres-version: [10, 11, 12, 13, 14, 15]
services:
postgres:
image: postgres:${{ matrix.postgres-version }}
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: dpgs_sandbox
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- uses: actions/cache@v1
with:
path: ~/.cache/pypoetry
key: py${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
py-poetry-
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
python -m pip install --upgrade poetry
python -m poetry install
- name: Run Tests
run: |
python -m poetry run coverage run dpgs_sandbox/manage.py test tests