From 5aa4ce1ef8ab82bd93c4753543d01588880f36b8 Mon Sep 17 00:00:00 2001 From: Arthur Meyre Date: Mon, 20 Sep 2021 11:46:34 +0200 Subject: [PATCH] fix(build): test coverage in pytest --- .github/workflows/continuous-integration.yaml | 2 +- Makefile | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/continuous-integration.yaml b/.github/workflows/continuous-integration.yaml index 75351c0f4..1f908762e 100644 --- a/.github/workflows/continuous-integration.yaml +++ b/.github/workflows/continuous-integration.yaml @@ -181,7 +181,7 @@ jobs: make pytest_nb - name: Test coverage id: coverage - if: ${{ steps.pytest.outcome != 'skipped' && !cancelled() }} + if: ${{ always() && steps.pytest.outcome != 'skipped' && !cancelled() }} run: | ./script/actions_utils/coverage.sh ${{ github.base_ref }} - name: Archive test coverage diff --git a/Makefile b/Makefile index 2c4a88e83..06c70be81 100644 --- a/Makefile +++ b/Makefile @@ -76,7 +76,8 @@ pcc_internal: check_python_format check_finalize_nb python_linting mypy_ci pydoc pytest: poetry run pytest -svv \ - --cov=$(SRC_DIR) --cov-report=term-missing:skip-covered --cov-report=xml tests/ + --cov=$(SRC_DIR) --cov-fail-under=100 \ + --cov-report=term-missing:skip-covered --cov-report=xml tests/ .PHONY: pytest # Not a huge fan of ignoring missing imports, but some packages do not have typing stubs