-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (38 loc) · 1.03 KB
/
pytest.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
name: test
on: push
jobs:
pytest:
name: Test (pytest)
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
runs-on: ubuntu-latest
container: python:${{ matrix.python-version }}
services:
postgres:
image: postgres
env:
POSTGRES_USER: rawl
POSTGRES_PASSWORD: s3cretpass
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.dev.txt
if [ -f requirements.txt ]; then
pip install -r requirements.txt
else
pip install -e .
fi
- name: Run pytest
run: pytest
env:
PG_DSN: postgresql://rawl:s3cretpass@postgres:5432/postgres
RAWL_DSN: postgresql://rawl:s3cretpass@postgres:5432/rawl_test