From c63d48d37a09523a0c92b854d8eb19de18e688e2 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 11 Apr 2024 13:18:01 +0200 Subject: [PATCH] Add CI coverage report --- .github/workflows/ci.yml | 6 ++++++ .gitignore | 1 + Makefile | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84f1a18..805c8f4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,12 @@ jobs: run: make dev-install - name: Run tests run: make test + - name: Report + uses: 5monkeys/cobertura-action@master + with: + path: coverage.xml + minimum_coverage: 90 + skip_covered: false check: runs-on: ubuntu-20.04 diff --git a/.gitignore b/.gitignore index db4bf50..8b67632 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ MANIFEST /.hypothesis /.coverage /.coverage.* +/coverage.xml # user makefile config /Makefile.conf diff --git a/Makefile b/Makefile index a7d1b45..2b2d124 100644 --- a/Makefile +++ b/Makefile @@ -46,7 +46,7 @@ docs-%: test: $(PYTHON) -m pytest \ - --cov-report html --cov-report term \ + --cov-report html --cov-report xml:coverage.xml --cov-report term \ --cov yosys_mau \ -n auto -q $(O) @@ -71,4 +71,4 @@ dev-install: ci: formatting lint typecheck test docs-html clean: docs-clean - rm -rf .coverage .pytest_cache .mypy_cache .ruff_cache htmlcov + rm -rf .coverage .pytest_cache .mypy_cache .ruff_cache htmlcov coverage.xml