diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 84f1a18..89823ab 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,13 @@ 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 + fail_below_threshold: true 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