File tree Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Expand file tree Collapse file tree 1 file changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ # This script runs the test suite and checks that code coverage has not decreased
4+ # relative to the main branch. It also generates an HTML coverage report.
5+
6+ # Uninstall numba to avoid issues with coverage measurement
7+ python -m pip install -q -e .[dev]
8+ python -m pip uninstall -y numba
9+
10+ # Get current coverage
11+ coverage run -m unittest discover ./tests
12+ coverage report > new_coverage.tmp
13+ current_coverage=$( coverage report --precision=7 --format=total)
14+ echo " Coverage: $current_coverage "
15+
16+ # Generate HTML coverage report
17+ coverage html -d htmlcov
18+
19+ # Reinstall numba, clean up temporary files
20+ python -m pip install -q -e .[dev]
21+ rm new_coverage.tmp
22+ echo " Numba reinstalled:"
23+ pip freeze | grep numba
24+
25+
26+ # Open the HTML coverage report in the default web browser if on macOS
27+ if [[ " $OSTYPE " == " darwin" * ]]; then
28+ open " htmlcov/index.html"
29+ fi
You can’t perform that action at this time.
0 commit comments