diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0214e4e3..93b1b0d4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -120,7 +120,11 @@ jobs: source "$PYTHON_VIRTUALENV_ACTIVATE" make test-coverage-report - codecov + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3.1.2 + with: + directory: ./test-reports/coverage/ + fail_ci_if_error: true - name: Check that compiled Python dependency manifests are up-to-date with their sources # FIXME: There are issues related to testing with multiple Python versions. diff --git a/Makefile b/Makefile index 4680ef81..b74f83ec 100644 --- a/Makefile +++ b/Makefile @@ -21,7 +21,7 @@ TOXENV ?= py310 .PHONY: clean clean-build clean-pyc clean-test .PHONY: install-dev install-deps-dev .PHONY: lint lint-fix test test-all test-coverage -.PHONY: test-coverage-report test-coverage-report-console test-coverage-report-html +.PHONY: test-coverage-report test-coverage-report-console test-coverage-report-xml test-coverage-report-html .PHONY: build dist deploy upload-release .PHONE: python-virtualenv .PHONY: python-deps-compile python-deps-sync-check python-pip-tools-install @@ -87,12 +87,16 @@ test-coverage: ## run tests and record test coverage coverage run --rcfile=setup.cfg setup.py test test-coverage-report: test-coverage-report-console +test-coverage-report: test-coverage-report-xml test-coverage-report: test-coverage-report-html test-coverage-report: ## Run tests, measure code coverage, and generate reports test-coverage-report-console: ## print test coverage summary coverage report --rcfile=setup.cfg -m +test-coverage-report-xml: ## Generate test coverage XML report + coverage xml --rcfile=setup.cfg + test-coverage-report-html: ## generate test coverage HTML report coverage html --rcfile=setup.cfg diff --git a/requirements-dev.in b/requirements-dev.in index 21df2341..99e34d84 100644 --- a/requirements-dev.in +++ b/requirements-dev.in @@ -6,7 +6,6 @@ black==23.1.0 bumpversion==0.5.3 -codecov==2.1.12 coverage==7.1.0 flake8==6.0.0 isort==5.12.0 diff --git a/requirements-dev.txt b/requirements-dev.txt index 2e9b5ab9..206dcd25 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -24,12 +24,8 @@ chardet==4.0.0 # via requests click==8.0.3 # via black -codecov==2.1.12 - # via -r requirements-dev.in coverage==7.1.0 - # via - # -r requirements-dev.in - # codecov + # via -r requirements-dev.in cryptography==39.0.1 # via # -c requirements.txt @@ -92,7 +88,6 @@ readme-renderer==35.0 # via twine requests==2.25.1 # via - # codecov # requests-toolbelt # twine requests-toolbelt==0.9.1 diff --git a/setup.cfg b/setup.cfg index 45faa047..c8f5641a 100644 --- a/setup.cfg +++ b/setup.cfg @@ -13,6 +13,9 @@ exclude_lines = if __name__ == .__main__. show_missing = True +[coverage:xml] +output = test-reports/coverage/xml/coverage.xml + [coverage:html] directory = test-reports/coverage/html