forked from pblottiere/QSA
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (35 loc) · 1.01 KB
/
tests.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
name: Tests
on:
push:
branches: [ main ]
pull_request:
jobs:
run_tests:
runs-on: ubuntu-latest
container:
image: postgis/postgis:15-3.4
services:
postgres:
image: postgres
env:
POSTGRES_DB: my_database
POSTGRES_PASSWORD: postgres
POSTGRES_USER: postgres
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v4
- name: install system dependencies
run: apt update && apt install -y python3-poetry python3-flask python3-boto3
- name: Install Python dependencies
working-directory: qsa-api
run: poetry install
- name: Run test without Postgres Dependency
working-directory: qsa-api
run: pytest -sv tests/test_api_storage_postgresql.py