-
Notifications
You must be signed in to change notification settings - Fork 5
42 lines (39 loc) · 1006 Bytes
/
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
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.9
cache: "pip"
cache-dependency-path: "**/requirements_dev.txt"
- name: Run tests
run: |
export SETTINGS_DIR=.
pip install -r requirements_dev.txt
pip install -e .
pre-commit run --all-files
pytest fastapi_tests
pytest tests