Skip to content

Commit

Permalink
Update coverage make rules (#73)
Browse files Browse the repository at this point in the history
- coverage/slow-coverage now produce coverage.json
- html coverage generated from .coverage
  • Loading branch information
analog-cbarber committed Sep 17, 2023
1 parent fccd147 commit 4017c9f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ build/

# test files
.coverage*
coverage.json
coverage.xml

# Generated files
doc/whl2conda-cli.md
Expand Down
12 changes: 7 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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) $<
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 4017c9f

Please sign in to comment.