Skip to content

Commit

Permalink
Merge pull request #97 from zuzukin/analog-cbarber-patch-1
Browse files Browse the repository at this point in the history
Upload coverage to codecov
  • Loading branch information
analog-cbarber authored Sep 17, 2023
2 parents b37740d + bcc38ad commit e21918a
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/python-package-conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
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 e21918a

Please sign in to comment.