Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add coveralls token to GH action config. #1020

Merged
merged 12 commits into from
Dec 13, 2022
Merged
2 changes: 1 addition & 1 deletion .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ omit =
venv/
source = armi
# change default .coverage file to something that doesn't have a dot
# because our Windows file server can't handle dots. :s
# because the Windows file server can't handle dots.
data_file = coverage_results.cov

[coverage:run]
Expand Down
14 changes: 13 additions & 1 deletion .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ jobs:

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

steps:
- uses: actions/checkout@v2
Expand All @@ -25,5 +26,16 @@ jobs:
- name: Run Coverage Part 1
run: tox -e cov1 || true
- name: Run Coverage Part 2
run: tox -e cov2,report
run: tox -e cov2
- name: Convert Coverage Results
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
pip install coveragepy-lcov
coveragepy-lcov --data_file_path coverage_results.cov --output_file_path lcov.txt
- name: Publish to coveralls.io
uses: coverallsapp/github-action@v1.1.2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.txt

9 changes: 4 additions & 5 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@ commands =
[testenv:report]
skip_install = true
deps=
coveralls
pip>=20.2
mpi4py
-r{toxinidir}/requirements.txt
-r{toxinidir}/requirements-testing.txt
commands =
coverage report
coverage html
coveralls --service=github
depends =
cov
passenv = TOXENV CI GITHUB_*

[testenv:manifest]
basepython = {env:PYTHON3_PATH:python3}
Expand Down