Skip to content

Commit 4994282

Browse files
committed
Minor change
1 parent bfede72 commit 4994282

File tree

2 files changed

+7
-11
lines changed

2 files changed

+7
-11
lines changed

.github/workflows/github-actions.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -214,9 +214,5 @@ jobs:
214214
run: ls
215215
shell: bash
216216
- name: Generate Coverage Report
217-
run: ./test.sh report coverage.stumpy.json
218-
shell: bash
219-
- name: Get Coverage Percentage
220-
run: |
221-
export TOTAL=$(python -c "import json;print(json.load(open('coverage.stumpy.json'))['totals']['percent_covered_display'])")
217+
run: ./test.sh report coverage.html
222218
shell: bash

test.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ print_mode="verbose"
55
custom_testfiles=()
66
max_iter=10
77
site_pkgs=$(python -c 'import site; print(site.getsitepackages()[0])')
8-
fcoveragejson="coverage.stumpy.json"
8+
fcoveragehtml="coverage.html"
99
# Parse command line arguments
1010
for var in "$@"
1111
do
@@ -33,8 +33,8 @@ do
3333
custom_testfiles+=("$var")
3434
elif [[ $var =~ ^[\-0-9]+$ ]]; then
3535
max_iter=$var
36-
elif [[ "$var" == *".json" ]]; then
37-
fcoveragejson=$var
36+
elif [[ "$var" == *".html" ]]; then
37+
fcoveragehtml=$var
3838
elif [[ "$var" == "links" ]]; then
3939
test_mode="links"
4040
else
@@ -175,11 +175,11 @@ show_coverage_report()
175175
coverage report -m --fail-under=100 --skip-covered --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc
176176
}
177177

178-
gen_coverage_json_report()
178+
gen_coverage_html_report()
179179
{
180180
# This function saves the coverage report in JSON format
181181
set_ray_coveragerc
182-
coverage json -o $fcoveragejson --skip-empty --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc
182+
coverage html -o $fcoveragehtml --skip-empty --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc
183183
}
184184

185185
combine_coverage_data_files()
@@ -391,7 +391,7 @@ elif [[ $test_mode == "report" ]]; then
391391
echo "Generate Coverage Report Only"
392392
# Assume coverage tests have already been executed
393393
# and a coverage file exists
394-
gen_coverage_json_report
394+
gen_coverage_html_report
395395
elif [[ $test_mode == "combine" ]]; then
396396
echo "Combine All Coverage Data Files"
397397
# Assume coverage tests have already been executed

0 commit comments

Comments
 (0)