blob: 471c22e7fd325d2e38b070207ae413e3e4acd35c [file] [log] [blame]
Jan Kundrát3a016432020-04-07 22:47:49 +02001- name: Generate pycobertura report
2 shell: |
3 set -ex
Jan Kundrát473cdf52020-04-14 13:34:33 +02004
5 pycobertura show --format html --output "{{ ansible_user_dir }}/zuul-output/logs/coverage-previous.html" \
6 --source "{{ previous_source_prefix }}/{{ zuul.project.canonical_hostname }}/{{ zuul.project.name}}" \
7 "{{ ansible_user_dir }}/coverage-previous.xml"
8
9 pycobertura show --format html --output "{{ ansible_user_dir }}/zuul-output/logs/coverage-current.html" \
10 --source "{{ zuul.project.src_dir }}" \
11 "{{ ansible_user_dir }}/coverage-current.xml"
12
Jan Kundrát3a016432020-04-07 22:47:49 +020013 pycobertura diff --format html --output "{{ ansible_user_dir }}/zuul-output/logs/coverage-diff.html" \
Jan Kundrát473cdf52020-04-14 13:34:33 +020014 --source1 "{{ previous_source_prefix }}/{{ zuul.project.canonical_hostname }}/{{ zuul.project.name}}" "{{ ansible_user_dir }}/coverage-previous.xml" \
15 --source2 "{{ zuul.project.src_dir }}" "{{ ansible_user_dir }}/coverage-current.xml"
Jan Kundrát1744cc02020-04-09 09:59:13 +020016
Jan Kundrát473cdf52020-04-14 13:34:33 +020017 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>;' \
18 -i "{{ ansible_user_dir }}/zuul-output/logs/coverage-diff.html" || true