-
Notifications
You must be signed in to change notification settings - Fork 5
44 lines (41 loc) · 1.12 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
39
40
41
42
43
44
name: run apphelpers tests
# Controls when the workflow will run
on:
# Triggers the workflow on a push to master
push:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_DB: defaultdb
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
redis:
image: redis
ports:
- 6379:6379
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
cache: "pip"
cache-dependency-path: "**/requirements_dev.txt"
- name: Run tests
run: |
export SETTINGS_DIR=.
pip install -r requirements_dev.txt
pip install -e .
gunicorn tests.service:__hug_wsgi__ -D
uvicorn fastapi_tests.service:app --port 5000 &
# pre-commit run --all-files TODO: check what's wrong in CI
pytest tests
pytest fastapi_tests