mirror of
https://github.com/iSoron/uhabits.git
synced 2025-12-06 01:08:50 -06:00
Update badge.py to Python 3
This commit is contained in:
2
build.sh
2
build.sh
@@ -168,7 +168,7 @@ generate_coverage_badge() {
|
|||||||
log_info "Generating code coverage badge"
|
log_info "Generating code coverage badge"
|
||||||
CORE_REPORT=uhabits-core/build/reports/jacoco/test/jacocoTestReport.xml
|
CORE_REPORT=uhabits-core/build/reports/jacoco/test/jacocoTestReport.xml
|
||||||
rm -f ${OUTPUTS_DIR}/coverage-badge.svg
|
rm -f ${OUTPUTS_DIR}/coverage-badge.svg
|
||||||
python tools/coverage-badge/badge.py -i $CORE_REPORT -o ${OUTPUTS_DIR}/coverage-badge
|
python3 tools/coverage-badge/badge.py -i $CORE_REPORT -o ${OUTPUTS_DIR}/coverage-badge
|
||||||
}
|
}
|
||||||
|
|
||||||
fetch_artifacts() {
|
fetch_artifacts() {
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ def get_total(report):
|
|||||||
missed = 0
|
missed = 0
|
||||||
covered = 0
|
covered = 0
|
||||||
for r in report.split(":"):
|
for r in report.split(":"):
|
||||||
doc = BeautifulSoup(file(r), 'xml')
|
doc = BeautifulSoup(open(r), 'xml')
|
||||||
tag = doc.select("report > counter[type^INST]")[0]
|
tag = doc.select("report > counter[type^INST]")[0]
|
||||||
missed = missed + float(tag['missed'])
|
missed = missed + float(tag['missed'])
|
||||||
covered = covered + float(tag['covered'])
|
covered = covered + float(tag['covered'])
|
||||||
|
|||||||
Reference in New Issue
Block a user