mirror of
https://github.com/pkkid/python-plexapi
synced 2024-11-13 23:47:06 +00:00
Add codecov configuration (#615)
* Add codecov configuration * Separate claimed & unclaimed coverage reports * Re-enable coverage comments
This commit is contained in:
parent
9d23ec072e
commit
5200a95e79
2 changed files with 25 additions and 4 deletions
18
.github/workflows/ci.yaml
vendored
18
.github/workflows/ci.yaml
vendored
|
@ -200,10 +200,18 @@ jobs:
|
||||||
|
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
name: Process test coverage
|
name: Process test coverage (${{ matrix.plex }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: pytest
|
needs: pytest
|
||||||
if: always()
|
if: always()
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
plex: ['unclaimed', 'claimed']
|
||||||
|
is-master:
|
||||||
|
- ${{ github.ref == 'refs/heads/master' }}
|
||||||
|
exclude:
|
||||||
|
- is-master: false
|
||||||
|
plex: claimed
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code from GitHub
|
- name: Check out code from GitHub
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
@ -235,12 +243,14 @@ jobs:
|
||||||
- name: Download all coverage artifacts
|
- name: Download all coverage artifacts
|
||||||
uses: actions/download-artifact@v2
|
uses: actions/download-artifact@v2
|
||||||
|
|
||||||
- name: Combine coverage results
|
- name: Combine ${{ matrix.plex }} coverage results
|
||||||
run: |
|
run: |
|
||||||
. venv/bin/activate
|
. venv/bin/activate
|
||||||
coverage combine coverage*/.coverage*
|
coverage combine coverage-${{ matrix.plex }}*/.coverage*
|
||||||
coverage report --fail-under=50
|
coverage report --fail-under=50
|
||||||
coverage xml
|
coverage xml
|
||||||
|
|
||||||
- name: Upload coverage to Codecov
|
- name: Upload ${{ matrix.plex }} coverage to Codecov
|
||||||
uses: codecov/codecov-action@v1
|
uses: codecov/codecov-action@v1
|
||||||
|
with:
|
||||||
|
flags: ${{ matrix.plex }}
|
||||||
|
|
11
codecov.yml
Normal file
11
codecov.yml
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
codecov:
|
||||||
|
branch: master
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
status:
|
||||||
|
project:
|
||||||
|
default:
|
||||||
|
target: auto
|
||||||
|
threshold: 10%
|
||||||
|
|
||||||
|
comment: true
|
Loading…
Reference in a new issue