From 5200a95e79c7307653b4fd090b342706021b026b Mon Sep 17 00:00:00 2001 From: jjlawren Date: Thu, 17 Dec 2020 01:06:22 -0600 Subject: [PATCH] Add codecov configuration (#615) * Add codecov configuration * Separate claimed & unclaimed coverage reports * Re-enable coverage comments --- .github/workflows/ci.yaml | 18 ++++++++++++++---- codecov.yml | 11 +++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 codecov.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2eb89f8e..0b9d4b90 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 }} diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 00000000..e59e2279 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,11 @@ +codecov: + branch: master + +coverage: + status: + project: + default: + target: auto + threshold: 10% + +comment: true