-
Notifications
You must be signed in to change notification settings - Fork 0
36 lines (34 loc) · 1.06 KB
/
pytest.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
name: Pytest
on:
push:
jobs:
pytest:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v3
- name: run docker-compose
run: |
docker-compose up -d
- name: Sleep for 30 seconds
uses: jakejarvis/wait-action@master
with:
time: "30s"
- name: init containers
run: |
docker-compose exec -T django python manage.py makemigrations;
docker-compose exec -T django python manage.py makemigrations streamer;
docker-compose exec -T django python manage.py migrate;
docker-compose exec -T django python manage.py collectstatic --noinput;
- name: run pytest
run: |
docker-compose exec -T django pytest --cov --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./Django/coverage.xml
env_vars: OS,PYTHON
name: codecov-umbrella
fail_ci_if_error: true
verbose: true