-
Notifications
You must be signed in to change notification settings - Fork 15
40 lines (33 loc) · 908 Bytes
/
run-tests.yml
File metadata and controls
40 lines (33 loc) · 908 Bytes
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
name: run-tests
on:
- push
- pull_request
jobs:
run-tests:
runs-on: ubuntu-latest
container: python:3.8
services:
db:
image: postgres:latest
env:
POSTGRES_DB: test
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run flake8 to check our code follows the python style guide
run: flake8
- name: Run tests
run: ./manage.py test
env:
DJANGO_SECRET_KEY: local
DATABASE_URL: postgresql://postgres:password@db/test