-
Notifications
You must be signed in to change notification settings - Fork 1
28 lines (26 loc) · 920 Bytes
/
ci.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
name: CI
on: [push]
# push:
# branches: [ $default-branch ]
# pull_request:
# branches: [ $default-branch ]
jobs:
test:
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
- name: Create and start containers
run: docker-compose -f docker-compose.tests.yml up -d
- name: Wait for containers to start
run: sleep 15
- name: Run database migrations on backend
run: docker-compose exec -T backend python manage.py migrate
- run: docker-compose exec -T backend pytest -p no:warnings --cov=. --cov-report html
- run: docker-compose exec -T backend coverage report --precision=2
# deploy:
# runs-on: tmaier/docker-compose:latest
# needs: [test]
# steps:
# - uses: actions/checkout@v2
# - name: Create and start containers
# run: docker-compose -f docker-compose.tests.yml up -d