From fce499eaafa0afecee5c14346ff7d75e2fe999b6 Mon Sep 17 00:00:00 2001 From: Fabian Mastenbroek Date: Sat, 20 Mar 2021 16:27:50 +0100 Subject: ci: Add reports and coverage tracking for API --- .github/workflows/build-api.yml | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to '.github') diff --git a/.github/workflows/build-api.yml b/.github/workflows/build-api.yml index 989e416f..4ae261db 100644 --- a/.github/workflows/build-api.yml +++ b/.github/workflows/build-api.yml @@ -26,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 + -- cgit v1.2.3