Skip to content

Commit

Permalink
Fix up workflow so it doesn't run the tests twice to produce coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
scott-carroll-verses-ai committed Jun 12, 2024
1 parent 6e8125c commit bb0c6cd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,16 @@ jobs:
run: |
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest test
- name: Calculate coverage
run: coverage run --source=pymdp -m unittest discover test
- name: Generate Coverage HTML
- name: Run tests with pytest, calculating coverage
run: coverage run --source=pymdp -m pytest test/
- name: Generate coverage HTML report
run: coverage html
# expect this to fail when run locally with `act`
# expect actions/upload-artifact@v4 to fail when run locally with `act`
- name: Upload Coverage HTML Report for pymdp as a build artifact
uses: actions/upload-artifact@v4
with:
name: pymdp--coverage-report
path: htmlcov/
retention-days: 30
- name: Print coverage report to console
run: |
coverage report
run: coverage report
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,5 @@ __pycache__
env/
pymdp.egg-info
inferactively_pymdp.egg-info
htmlcov
.coverage

0 comments on commit bb0c6cd

Please sign in to comment.