Skip to content

Commit

Permalink
Add coveralls to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
paulf81 committed Feb 2, 2024
1 parent aeafb9d commit 8f99536
Showing 1 changed file with 24 additions and 13 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/continuous-integration-workflow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,29 @@ jobs:
# -rA displays the captured output for all tests after they're run
# See the docs: https://doc.pytest.org/en/latest/reference/reference.html#command-line-flags
pytest -rA tests/
- name: Generate coverage report
# Run these tests on unit tests only so that we avoid inflating our code
# coverage through the regression tests
- name: Run coverage tests
if: ${{ env.COVERALLS_REPO_TOKEN }}
if: matrix.os == 'ubuntu-latest'
run: |
pip install pytest
pip install pytest-cov
pytest --cov=./ --cov-report=xml tests/
- name: Upload coverage to Codecov
if: ${{ env.CODECOV_TOKEN }} # Don't attempt to upload if the codecov token is not configured
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
fail_ci_if_error: true
pip install pytest coverage python-coveralls
coverage run -m pytest -rA tests/
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}


# Former codecov version
# - name: Generate coverage report
# # Run these tests on unit tests only so that we avoid inflating our code
# # coverage through the regression tests
# if: matrix.os == 'ubuntu-latest'
# run: |
# pip install pytest
# pip install pytest-cov
# pytest --cov=./ --cov-report=xml tests/
# - name: Upload coverage to Codecov
# if: ${{ env.CODECOV_TOKEN }} # Don't attempt to upload if the codecov token is not configured
# uses: codecov/codecov-action@v3
# with:
# token: ${{ secrets.CODECOV_TOKEN }}
# files: ./coverage.xml
# fail_ci_if_error: true

0 comments on commit 8f99536

Please sign in to comment.