-
Notifications
You must be signed in to change notification settings - Fork 61
54 lines (51 loc) · 1.3 KB
/
test.yaml
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
43
44
45
46
47
48
49
50
51
52
53
54
name: pr-test
on:
pull_request:
branches:
- master
push:
branches:
- master
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- 3.7
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
- name: Test installing development dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
- name: Run Flake8 test
run: flake8 .
test:
runs-on: ubuntu-latest
needs:
- lint
steps:
- uses: actions/checkout@v2
- name: Run docker-compose build
working-directory: dockerize
run: docker-compose build
- name: Run the containers
working-directory: dockerize
run: docker-compose up -d db devweb
- name: Run Coverage test
working-directory: dockerize
run: |
cat << EOF | docker-compose exec -T devweb bash
pip install coverage
python manage.py makemigrations
python manage.py migrate
coverage run manage.py test
coverage xml
EOF
- name: Upload coverage to codecov
uses: codecov/codecov-action@v2
with:
fail_ci_if_error: true