-
Notifications
You must be signed in to change notification settings - Fork 5
48 lines (45 loc) · 1.17 KB
/
codecov.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
# This workflow will install Python dependencies and run codecov
# https://github.com/codecov/codecov-action#example-workflowyml-with-codecov-action
name: codecov
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@master
- name: Set up Python
uses: actions/setup-python@master
with:
python-version: 3.7
- name: Install dependencies
run: |
pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov
- name: Launch Flask app
run: |
python models/download_muse.py
python app.py &
env:
SECRET_KEY: test
JWT_SECRET_KEY: test
- name: Generate coverage report
run: |
pytest --cov=./ --cov-report=xml
env:
SECRET_KEY: test
JWT_SECRET_KEY: test
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
flags: unittests
env_vars: OS,PYTHON
fail_ci_if_error: true
verbose: true