Skip to content

Commit

Permalink
trying to fix coverage (#735)
Browse files Browse the repository at this point in the history
* trying to fix coverage

* put the coveralls call in a different job so it happens whether or not there's a failure in the tests

* invalid yaml. trying again

* trying to add always() so we upload to coveralls even when a test fails https://stackoverflow.com/questions/58858429/how-to-run-a-github-actions-step-even-if-the-previous-step-fails-while-still-f

* added github_token, because that's what the error message said to do, but not sure why I have to https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication

* added line to see whether .coverage file is being generated

* added a cd down to the directory where the coverage report lives
  • Loading branch information
pavelkomarov authored Oct 18, 2024
1 parent de0a8cc commit 37658ee
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
pip install 'numpy<2.0'
pip install matplotlib #Some imports require matplotlib
pip install scipy #To not skip tests
pip install flake8 meson-python ninja pytest
pip install flake8 meson-python ninja pytest coveralls
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Checkout Clawpack
Expand All @@ -53,4 +53,14 @@ jobs:
- name: Test with pytest
run: |
cd ${CLAW}/pyclaw
pytest --ignore=development -k "not test_shallow_sphere"
coverage run --source=src -m pytest --ignore=development -k "not test_shallow_sphere"
- name: Upload to Coveralls
if: always()
run: |
cd ${CLAW}/pyclaw
ls -l .coverage
coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[![Build Status](https://github.com/clawpack/pyclaw/actions/workflows/testing.yml/badge.svg)](https://github.com/clawpack/pyclaw/actions)
[![Coverage Status](https://img.shields.io/coveralls/clawpack/pyclaw.svg)](https://coveralls.io/r/clawpack/pyclaw?branch=master)

[![Coverage Status](https://coveralls.io/repos/github/clawpack/pyclaw/badge.svg?branch=master)](https://coveralls.io/r/clawpack/pyclaw?branch=master)
[![PyPI version](https://badge.fury.io/py/clawpack.svg)](https://badge.fury.io/py/clawpack)


Expand Down

0 comments on commit 37658ee

Please sign in to comment.