-
Notifications
You must be signed in to change notification settings - Fork 8
33 lines (30 loc) · 982 Bytes
/
test.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
name: Test Application
on: [push]
env:
MAILGUN_API_KEY: ${{ secrets.MAILGUN_API_KEY }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
jobs:
django-tests:
name: 'Run unit tests'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the stack
run: docker-compose run web python3 manage.py test
coverage:
name: 'Check test coverage'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build the stack
run: docker-compose build
- name: Create coverage XML report
run: docker-compose run web /bin/bash -c "coverage run --source='.' manage.py test && coverage xml"
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
file: hiss/coverage.xml
name: codecov-umbrella
fail_ci_if_error: true