diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-03-20 16:51:05 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-20 16:51:05 +0100 |
| commit | 0862f8489b1122671cefa5c5bd59f677b56a3712 (patch) | |
| tree | 9256a835306601fa522476d02be4c38e0bf001c9 /.github/workflows/build-api.yml | |
| parent | 592d60d6d2ef51923eebd844888930b07892da39 (diff) | |
| parent | fce499eaafa0afecee5c14346ff7d75e2fe999b6 (diff) | |
Add support for code coverage tracking via Codecov
This pull request enables aggregate code coverage reports via Jacoco and adds support for coverage tracking via Codecov.
Diffstat (limited to '.github/workflows/build-api.yml')
| -rw-r--r-- | .github/workflows/build-api.yml | 23 |
1 files changed, 16 insertions, 7 deletions
diff --git a/.github/workflows/build-api.yml b/.github/workflows/build-api.yml index 5bbc30c4..4ae261db 100644 --- a/.github/workflows/build-api.yml +++ b/.github/workflows/build-api.yml @@ -1,9 +1,6 @@ name: Build API on: - push: - paths: - - 'api/**' pull_request: branches: [master] @@ -29,8 +26,20 @@ jobs: python -m pip install --upgrade pip pip install -r requirements.txt - name: Lint with pylint - run: | - ./check.sh + run: ./check.sh - name: Test with pytest - run: | - pytest opendc + run: pytest --cov=opendc/ --junitxml=.junit-report.xml + - name: Publish report + if: always() + uses: mikepenz/action-junit-report@v2 + with: + check_name: test (Python ${{ matrix.python }}) + report_paths: '**/.junit-report.xml' + github_token: ${{ secrets.GITHUB_TOKEN }} + - name: Upload code coverage + uses: codecov/codecov-action@v1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + files: ./api/.coverage + flags: api + |
