-
Notifications
You must be signed in to change notification settings - Fork 212
43 lines (41 loc) · 1.04 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
name: Code coverage
on:
push:
branches:
- '**'
pull_request:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.x
- name: create-json
uses: jsdaniell/[email protected]
with:
name: "oauth.json"
dir: "tests/"
json: ${{ secrets.OAUTH_JSON }}
- name: Generate coverage report
env:
HEADERS_AUTH: ${{ secrets.HEADERS_AUTH }}
TEST_CFG: ${{ secrets.TEST_CFG }}
run: |
pip install -e .
pip install coverage
curl -o tests/test.mp3 https://www.kozco.com/tech/piano2-CoolEdit.mp3
cat <<< "$HEADERS_AUTH" > tests/headers_auth.json
cat <<< "$TEST_CFG" > tests/test.cfg
coverage run
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
file: coverage.xml
flags: unittests
fail_ci_if_error: true