-
Notifications
You must be signed in to change notification settings - Fork 2
69 lines (59 loc) · 1.73 KB
/
coverage.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Django Coverage
on:
push:
branches:
- main
- COV
pull_request:
branches:
- main
- COV
jobs:
install:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: |
sudo apt-get update
build:
needs: install
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.11
- name: Install Dependencies
run: |
cd ScheduleBuilder
pip install -r requirements.txt
- name: Run Google Calendar Tests with Coverage
env:
CAL_ID: c_6ed17073345c64d5b392f5a8ef7b4a62938f12c8fc5fecfa4b7256ef88acad28@group.calendar.google.com
run: |
cd ScheduleBuilder/google_calendar
pytest --cov=./ test.py
- name: Run Account Tests with Coverage
env:
CAL_ID: c_6ed17073345c64d5b392f5a8ef7b4a62938f12c8fc5fecfa4b7256ef88acad28@group.calendar.google.com
run: |
cd ScheduleBuilder
python manage.py makemigrations
python manage.py migrate
cd account
pytest --cov=./ regtests.py
- name: Combine Coverage Reports
run: |
cd ScheduleBuilder
coverage combine google_calendar/.coverage account/.coverage
coverage xml -o combined_coverage.xml
- name: Upload Coverage to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./ScheduleBuilder/combined_coverage.xml
fail_ci_if_error: true