Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2a12de55 authored by Jonathan Klee's avatar Jonathan Klee
Browse files

Merge branch '0000-a15-fix-coverage-regex' into 'main'

chore: Fix regexp so that badge can read the value

See merge request !646
parents d9cabe2a d57e489b
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ test:
  script:
    - ./gradlew test jacocoDebugReport -PtestAccountName="$testAccountName" -PtestAccountPwd="$testAccountPwd" -PtestServerUrl="$testServerUrl"
    - python3 scripts/print_instruction_coverage.py app/build/reports/jacoco/jacocoDebugReport/jacocoDebugReport.xml
  coverage: '/INSTRUCTION_COVERAGE\\s+([0-9]{1,3}\\.?[0-9]*)%/'
  coverage: '/Total.*?([0-9]{1,3})%/'
  artifacts:
    when: always
    paths:
+2 −1
Original line number Diff line number Diff line
@@ -12,7 +12,8 @@ def main() -> None:
    covered_count = int(instruction_counter.attrib["covered"])
    total_instructions = covered_count + missed_count
    coverage_pct = covered_count / total_instructions * 100 if total_instructions else 0
    print(f"INSTRUCTION_COVERAGE {coverage_pct:.2f}%")
    coverage_pct_rounded = round(coverage_pct)
    print(f"Total {coverage_pct_rounded}%")


if __name__ == "__main__":