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

Remove coveragepy-lcov dependency during CI. #1382

Merged
merged 2 commits into from
Aug 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,16 @@ on:

jobs:
build:

runs-on: ubuntu-22.04

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

steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.10'
python-version: '3.11'
- name: Update package index
run: sudo apt-get update
- name: Install mpi libs
Expand All @@ -31,17 +28,8 @@ jobs:
run: tox -e cov1 || true
- name: Run Coverage Part 2
run: tox -e cov2
- name: Convert Coverage Results
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: |
pip install click==8.1.3
pip install coverage==6.5.0
pip install coveragepy-lcov==0.1.2
coveragepy-lcov --data_file_path coverage_results.cov --output_file_path lcov.txt
- name: Publish to coveralls.io
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: lcov.txt

path-to-lcov: coverage.lcov
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ doc/gallery
doc/gallery-src/framework/*.yaml
.coverage
coverage.xml
coverage.lcov
coverage_results.*
htmlcov/
monkeytype.*
Expand Down
3 changes: 1 addition & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ def collectExtraFiles():
entry_points={"console_scripts": ["armi = armi.__main__:main"]},
install_requires=[
"configparser",
'coverage; python_version>="3.11"',
'coverage<=6.5.0; python_version<"3.11"',
"coverage",
"future",
"h5py>=3.0",
"htmltree",
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ deps=
allowlist_externals =
/usr/bin/mpiexec
commands =
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=.coveragerc -m pytest --cov=armi --cov-config=.coveragerc --ignore=venv --cov-fail-under=80 armi/tests/test_mpiFeatures.py
mpiexec -n 2 --use-hwthread-cpus coverage run --rcfile=.coveragerc -m pytest --cov=armi --cov-config=.coveragerc --cov-report=lcov --ignore=venv --cov-fail-under=80 armi/tests/test_mpiFeatures.py

# Second, run code coverage over the rest of the unit tests, and combine the coverage results together
[testenv:cov2]
Expand All @@ -51,7 +51,7 @@ deps=
allowlist_externals =
/usr/bin/mpiexec
commands =
coverage run --rcfile=.coveragerc -m pytest -n 4 --cov=armi --cov-config=.coveragerc --cov-append --ignore=venv armi
coverage run --rcfile=.coveragerc -m pytest -n 4 --cov=armi --cov-config=.coveragerc --cov-report=lcov --cov-append --ignore=venv armi
coverage combine --rcfile=.coveragerc --keep -a

# NOTE: This only runs the MPI unit tests.
Expand Down