From fccd1470f1c0dd471362061233879df4e1f4c6d9 Mon Sep 17 00:00:00 2001 From: Christopher Barber Date: Sun, 17 Sep 2023 08:35:17 -0400 Subject: [PATCH 1/2] Upload coverage to codecov --- .github/workflows/python-package-conda.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/python-package-conda.yml b/.github/workflows/python-package-conda.yml index feaed9e..0a55949 100644 --- a/.github/workflows/python-package-conda.yml +++ b/.github/workflows/python-package-conda.yml @@ -41,3 +41,7 @@ jobs: if: success() || failure() run: | make coverage + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 4017c9fdf1f853ae80232333787af7d25a2860e0 Mon Sep 17 00:00:00 2001 From: Christopher Barber Date: Sun, 17 Sep 2023 08:57:44 -0400 Subject: [PATCH 2/2] Update coverage make rules (#73) - coverage/slow-coverage now produce coverage.json - html coverage generated from .coverage --- .gitignore | 2 ++ Makefile | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.gitignore b/.gitignore index 705125d..e2333e6 100644 --- a/.gitignore +++ b/.gitignore @@ -17,6 +17,8 @@ build/ # test files .coverage* +coverage.json +coverage.xml # Generated files doc/whl2conda-cli.md diff --git a/Makefile b/Makefile index f0d9f26..a086e41 100644 --- a/Makefile +++ b/Makefile @@ -105,13 +105,15 @@ pytest: test: pytest coverage: - $(CONDA_RUN) pytest -s --cov=src --cov-report=html --cov-report=term test + $(CONDA_RUN) pytest -s --cov=src --cov-report=json --cov-report=term test slow-coverage: - $(CONDA_RUN) pytest -s --cov=src --cov-report=html --cov-report=term test --run-slow + $(CONDA_RUN) pytest -s --cov=src --cov-report=json --cov-report=term test --run-slow -htmlcov/index.html: - $(MAKE) coverage +htmlcov/index.html: .coverage + $(CONDA_RUN) coverage html + +html-coverage: htmlcov/index.html open-coverage: htmlcov/index.html $(OPEN) $< @@ -208,7 +210,7 @@ upload: upload-sdist upload-wheel # clean-coverage: - $(RMDIR) htmlcov .coverage + $(RMDIR) htmlcov .coverage coverage.json coverage.xml clean-doc: $(RMDIR) site doc/whl2conda-cli.md