Add codecov configuration (#615)

* Add codecov configuration

* Separate claimed & unclaimed coverage reports

* Re-enable coverage comments
This commit is contained in:
jjlawren 2020-12-17 01:06:22 -06:00 committed by GitHub
parent 9d23ec072e
commit 5200a95e79
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 25 additions and 4 deletions

View file

@ -200,10 +200,18 @@ jobs:
coverage:
name: Process test coverage
name: Process test coverage (${{ matrix.plex }})
runs-on: ubuntu-latest
needs: pytest
if: always()
strategy:
matrix:
plex: ['unclaimed', 'claimed']
is-master:
- ${{ github.ref == 'refs/heads/master' }}
exclude:
- is-master: false
plex: claimed
steps:
- name: Check out code from GitHub
uses: actions/checkout@v2
@ -235,12 +243,14 @@ jobs:
- name: Download all coverage artifacts
uses: actions/download-artifact@v2
- name: Combine coverage results
- name: Combine ${{ matrix.plex }} coverage results
run: |
. venv/bin/activate
coverage combine coverage*/.coverage*
coverage combine coverage-${{ matrix.plex }}*/.coverage*
coverage report --fail-under=50
coverage xml
- name: Upload coverage to Codecov
- name: Upload ${{ matrix.plex }} coverage to Codecov
uses: codecov/codecov-action@v1
with:
flags: ${{ matrix.plex }}

11
codecov.yml Normal file
View file

@ -0,0 +1,11 @@
codecov:
branch: master
coverage:
status:
project:
default:
target: auto
threshold: 10%
comment: true