-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (39 loc) · 1.15 KB
/
test_backend.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
name: Test Backend
on: [push]
# Cancel inprogress runs if new commit pushed
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
runs-on: [self-hosted, linux, large]
defaults:
run:
working-directory: backend
services:
postgres:
image: postgres:15.2
env:
POSTGRES_PASSWORD: password
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- uses: Gr1N/setup-poetry@v8
with:
poetry-version: "1.5.1"
- run: poetry install
- run: poetry run black --check test_observer tests migrations scripts
- run: poetry run ruff test_observer tests migrations scripts
- run: poetry run mypy --explicit-package-bases test_observer tests migrations scripts
- run: poetry run pytest
env:
TEST_DB_URL: postgresql+pg8000://postgres:password@localhost:5432/postgres