From 1327abf00b2857338b8f4cbdd96c56fb36c983a8 Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Wed, 14 Jun 2023 17:11:06 +0200 Subject: [PATCH] Nicer coverage --- .github/workflows/ci.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cb56e355..386add17 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,6 +69,7 @@ jobs: if-no-files-found: ignore coverage: + name: Combine & check coverage. runs-on: ubuntu-latest needs: tests @@ -84,12 +85,17 @@ jobs: with: name: coverage-data - - name: Combine coverage and fail if it's <100%. + - name: Combine coverage & fail if it's <100%. run: | - python -Im pip install --upgrade coverage[toml] + python -Im pip install coverage[toml] python -Im coverage combine python -Im coverage html --skip-covered --skip-empty + + # Report and write to summary. + python -Im coverage report | sed 's/^/ /' >> $GITHUB_STEP_SUMMARY + + # Report again and fail if under 100%. python -Im coverage report --fail-under=100 - name: Upload HTML report if check failed.