-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (36 loc) · 912 Bytes
/
test.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
name: Run tests
on: [push]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:14-bullseye
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
env:
DATABASE_DSN: postgres://postgres:postgres@localhost:5432/postgres
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install poetry
run: pip install poetry
- name: Install dependancies
run: poetry install
- name: Lint
run: |
poetry run black --check .
poetry run isort -c .
poetry run mypy .
poetry run flake8
- name: Test
run: poetry run pytest