-
Notifications
You must be signed in to change notification settings - Fork 75
36 lines (33 loc) · 935 Bytes
/
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
name: Code coverage
on:
push
env:
XDG_CACHE_HOME: .cache
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: Generate coverage report
env:
SETTINGS_INI: ${{ secrets.SETTINGS_INI }}
SPOTIPY_CACHE: ${{ secrets.SPOTIPY_CACHE }}
run: |
pip install -e .
pip install coverage
cat <<< "$SETTINGS_INI" > spotify_to_ytmusic/settings.ini
mkdir -p $XDG_CACHE_HOME/spotify_to_ytmusic
cat <<< "$SPOTIPY_CACHE" > $XDG_CACHE_HOME/spotify_to_ytmusic/spotipy.cache
coverage run
coverage xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: coverage.xml
flags: unittests
fail_ci_if_error: true
token: ${{ secrets.CODECOV_TOKEN }}