blob: 0659d6dda6a9d7aa83c8443a39b310d9159a6501 [file] [log] [blame]
Jan Kundrát3a016432020-04-07 22:47:49 +02001- name: Generate pycobertura report
2 shell: |
3 set -ex
Jan Kundrát4e7a4562020-04-14 15:05:09 +02004 PATH=${PATH}:~/.local/bin
Jan Kundrát473cdf52020-04-14 13:34:33 +02005
6 pycobertura show --format html --output "{{ ansible_user_dir }}/zuul-output/logs/coverage-previous.html" \
7 --source "{{ previous_source_prefix }}/{{ zuul.project.canonical_hostname }}/{{ zuul.project.name}}" \
8 "{{ ansible_user_dir }}/coverage-previous.xml"
9
10 pycobertura show --format html --output "{{ ansible_user_dir }}/zuul-output/logs/coverage-current.html" \
11 --source "{{ zuul.project.src_dir }}" \
12 "{{ ansible_user_dir }}/coverage-current.xml"
13
Jan Kundrát3a016432020-04-07 22:47:49 +020014 pycobertura diff --format html --output "{{ ansible_user_dir }}/zuul-output/logs/coverage-diff.html" \
Jan Kundrát473cdf52020-04-14 13:34:33 +020015 --source1 "{{ previous_source_prefix }}/{{ zuul.project.canonical_hostname }}/{{ zuul.project.name}}" "{{ ansible_user_dir }}/coverage-previous.xml" \
16 --source2 "{{ zuul.project.src_dir }}" "{{ ansible_user_dir }}/coverage-current.xml"
Jan Kundrát1744cc02020-04-09 09:59:13 +020017
Jan Kundrát473cdf52020-04-14 13:34:33 +020018 sed -e 's;^ </body>$; <p>Show <a href="coverage-current.html">previous</a> or <a href="coverage-current.html">final coverage</a> only</p>\n </body>;' \
19 -i "{{ ansible_user_dir }}/zuul-output/logs/coverage-diff.html" || true