-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (35 loc) · 975 Bytes
/
DjangoCI.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: Django CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:12
env:
POSTGRES_DB: data-iot
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
ports:
- 5432:5432
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Install dependencies
run: |
pip install -r ./backend/requirements.txt
- name: Run tests
run: |
python ./backend/API/manage.py test
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/data-iot
DJANGO_SETTINGS_MODULE: project.settings.test_settings