File: 04-summary.yml

package info (click to toggle)
pixman 0.44.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,496 kB
  • sloc: ansic: 53,617; asm: 12,439; perl: 143; makefile: 17
file content (47 lines) | stat: -rw-r--r-- 1,412 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
# Summary stage
#
# This stage takes coverage reports from test runs for all architectures, and
# merges it into a single report, with GitLab visualization. There is also an
# HTML report generated as a separate artifact.

summary:
  extends: .target:all
  stage: summary
  variables:
    TARGET: linux-amd64
    COVERAGE_SUMMARY_DIR: ${COVERAGE_BASE_DIR}/summary
  needs:
    - job: test:linux-386
      optional: true
    - job: test:linux-amd64
      optional: true
    - job: test:linux-arm-v7
      optional: true
    - job: test:linux-arm64-v8
      optional: true
    - job: test:linux-mips64el
      optional: true
    - job: test:linux-ppc64le
      optional: true
    - job: test:linux-riscv64
      optional: true
  script:
    - echo "Input coverage reports:" && ls ${COVERAGE_BASE_DIR}/*.json || (echo "No coverage reports available." && exit)
    - |
      args=( )
      for f in ${COVERAGE_BASE_DIR}/*.json; do
        args+=( "-a" "$f" )
      done
    - mkdir -p ${COVERAGE_SUMMARY_DIR}
    - gcovr "${args[@]}"
        --cobertura-pretty --cobertura ${COVERAGE_SUMMARY_DIR}/coverage.xml
        --html-details ${COVERAGE_SUMMARY_DIR}/coverage.html
        --txt --print-summary
  coverage: '/^TOTAL.*\s+(\d+\%)$/'
  artifacts:
    reports:
      coverage_report:
        coverage_format: cobertura
        path: ${COVERAGE_SUMMARY_DIR}/coverage.xml
    paths:
      - ${COVERAGE_SUMMARY_DIR}/