Skip to content

Commit bbd7b49

Browse files
committed
Initiate migration away from codecov
1 parent cf5b423 commit bbd7b49

File tree

3 files changed

+16
-17
lines changed

3 files changed

+16
-17
lines changed

.github/workflows/github-actions.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,14 +156,13 @@ jobs:
156156
run: ./test.sh report coverage.stumpy.xml
157157
shell: bash
158158
- name: List Reports
159-
run: ls *xml
159+
run: ls *json
160160
shell: bash
161161
- name: Show Reports
162-
run: head coverage.stumpy.xml
162+
run: head coverage.stumpy.json
163+
shell: bash
164+
- name: Get Coverage Percentage
165+
run: |
166+
export TOTAL=$(python -c "import json;print(json.load(open('coverage.json'))['totals']['percent_covered_display'])")
167+
echo $TOTAL
163168
shell: bash
164-
- name: Upload Coverage Tests Results
165-
uses: codecov/codecov-action@v4
166-
with:
167-
file: ./coverage.stumpy.xml
168-
verbose: true
169-
token: ${{ secrets.CODECOV_TOKEN }}

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
LOG*
99
PID
1010
.coverage*
11-
coverage.xml
12-
stumpy.coverage.xml
11+
coverage.json
12+
coverage.stumpy.json
1313
dask-worker-space
1414
stumpy.egg-info
1515
build

test.sh

Lines changed: 7 additions & 7 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-
fcoveragexml="coverage.stumpy.xml"
8+
fcoveragejson="coverage.stumpy.json"
99
# Parse command line arguments
1010
for var in "$@"
1111
do
@@ -31,8 +31,8 @@ do
3131
custom_testfiles+=("$var")
3232
elif [[ $var =~ ^[\-0-9]+$ ]]; then
3333
max_iter=$var
34-
elif [[ "$var" == *".xml" ]]; then
35-
fcoveragexml=$var
34+
elif [[ "$var" == *".json" ]]; then
35+
fcoveragejson=$var
3636
elif [[ "$var" == "links" ]]; then
3737
test_mode="links"
3838
else
@@ -173,11 +173,11 @@ show_coverage_report()
173173
coverage report -m --fail-under=100 --skip-covered --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc
174174
}
175175

176-
gen_coverage_xml_report()
176+
gen_coverage_json_report()
177177
{
178-
# This function saves the coverage report in Cobertura XML format, which is compatible with codecov
178+
# This function saves the coverage report in JSON format
179179
set_ray_coveragerc
180-
coverage xml -o $fcoveragexml --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc
180+
coverage json -o $fcoveragejson --fail-under=100 --omit=fastmath.py,docstring.py,min_versions.py,ray_python_version.py $fcoveragerc
181181
}
182182

183183
test_custom()
@@ -384,7 +384,7 @@ elif [[ $test_mode == "report" ]]; then
384384
echo "Generate Coverage Report Only"
385385
# Assume coverage tests have already been executed
386386
# and a coverage file exists
387-
gen_coverage_xml_report
387+
gen_coverage_json_report
388388
elif [[ $test_mode == "gpu" ]]; then
389389
echo "Executing GPU Unit Tests Only"
390390
test_gpu

0 commit comments

Comments
 (0)