Skip to content
Snippets Groups Projects
Commit f108c56e authored by René Schöne's avatar René Schöne
Browse files

Using python3.

parent 62068002
No related branches found
No related tags found
1 merge request!1Fixing CI
Pipeline #2354 passed with warnings
...@@ -39,14 +39,14 @@ test: ...@@ -39,14 +39,14 @@ test:
- $TEST_REPORTS - $TEST_REPORTS
coverage: coverage:
image: python:3.7.1-stretch image: python:3.7.1-alpine
stage: report stage: report
dependencies: dependencies:
- test - test
script: script:
# - ./gradlew --continue --console=plain -x test jacocoTestReport # - ./gradlew --continue --console=plain -x test jacocoTestReport
- pip install --user untangle - pip install --user untangle
- python2 print-coverage.py - python print-coverage.py
coverage: "/Covered (\\d{1,3}\\.\\d{2}%) of instructions for all projects\\./" coverage: "/Covered (\\d{1,3}\\.\\d{2}%) of instructions for all projects\\./"
cache: cache:
key: "$CI_COMMIT_REF_NAME" key: "$CI_COMMIT_REF_NAME"
......
...@@ -3,4 +3,4 @@ obj = untangle.parse('eraser-base/build/reports/jacoco/test/jacocoTestReport.xml ...@@ -3,4 +3,4 @@ obj = untangle.parse('eraser-base/build/reports/jacoco/test/jacocoTestReport.xml
instructions = [o for o in obj.report.counter if o['type'] == 'INSTRUCTION'][0] instructions = [o for o in obj.report.counter if o['type'] == 'INSTRUCTION'][0]
missed, covered = int(instructions['missed']), int(instructions['covered']) missed, covered = int(instructions['missed']), int(instructions['covered'])
# print missed / (missed + covered) # print missed / (missed + covered)
print 'Covered %.2f%% of instructions for all projects.' % (missed * 100.0 / (missed + covered)) print('Covered %.2f%% of instructions for all projects.' % (missed * 100.0 / (missed + covered)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment