-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (42 loc) · 1.76 KB
/
Codecoverage.yml
File metadata and controls
49 lines (42 loc) · 1.76 KB
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
name: Unit Tests
on:
push:
branches:
- master
jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: 3.8
- name: Setup python packages
run: pip install -r requirements.dev.txt && pip install -r requirements.txt
- name: Create docker secrets dir
run: sudo mkdir -p /var/run/secrets
- name: Create application_id secret
run: echo "wrong_id" | sudo tee /var/run/secrets/application_id && echo "s c o p e s" | sudo tee /var/run/secrets/scopes
- name: Save cookie file
run: echo '${{ secrets.cookies }}' > cookies.json
- name: Generate coverage report
env:
application_id: ${{ secrets.application_id }}
application_secret: ${{ secrets.application_secret }}
scopes: "ugc-image-upload user-read-playback-state user-read-email playlist-read-collaborative user-modify-playback-state user-read-private playlist-modify-public user-library-modify user-top-read user-read-currently-playing playlist-read-private user-follow-read app-remote-control user-read-recently-played playlist-modify-private user-follow-modify user-library-read"
redirect_url: "http://localhost:1234"
cookie_file_path: "/home/runner/work/AsyncSpotify/AsyncSpotify/cookies.json"
github_action: "True"
run: pytest -s --cov=async_spotify src/test --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1.0.5
with:
token: ${{ secrets.codecov_token }}
file: ./coverage.xml
flags: unittests
name: codecov-spotify-api
fail_ci_if_error: true