From c96540e697e6bfe9ecd464e6c6a537cc3bf06e80 Mon Sep 17 00:00:00 2001 From: Pablo Galindo Date: Wed, 23 Oct 2024 17:56:32 +0100 Subject: [PATCH] Skip coverage html generation in Alpine There a bug either in the genhtml utility in Alpine or in coverage.py that trips over some categories that are in the dump file. We don't use these files in CI for anything so for now we should skip the html generation. Signed-off-by: Pablo Galindo --- .github/workflows/build.yml | 3 +++ Makefile | 6 ++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 4484668b8a..77852d06d4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -72,6 +72,9 @@ jobs: container: image: alpine options: --cap-add=SYS_PTRACE + env: + # Coverage is kind of broken in Alpine + SKIP_COVERAGE_HTML: 1 steps: - uses: actions/checkout@v4 - name: Set up dependencies diff --git a/Makefile b/Makefile index 96d141e917..bc540593e3 100644 --- a/Makefile +++ b/Makefile @@ -77,8 +77,10 @@ pycoverage: ## Run the test suite, with Python code coverage --cov-fail-under=90 \ --cov-append $(PYTEST_ARGS) \ tests - $(PYTHON) -m coverage lcov -i -o pycoverage.lcov - genhtml *coverage.lcov --branch-coverage --output-directory memray-coverage $(GENHTMLOPTS) + if [ -z "$$SKIP_COVERAGE_HTML" ]; then \ + $(PYTHON) -m coverage lcov -i -o pycoverage.lcov + genhtml *coverage.lcov --branch-coverage --output-directory memray-coverage $(GENHTMLOPTS); \ + fi .PHONY: valgrind valgrind: ## Run valgrind, with the correct configuration