1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00
community.general/.azure-pipelines/scripts/report-coverage.sh
patchback[bot] d53052f27a
Replace Bash codecov uploader by new Python codecov uploader. (#3713) (#3714)
ci_coverage

(cherry picked from commit 5948809162)

Co-authored-by: Felix Fontein <felix@fontein.de>
2021-11-13 13:21:56 +01:00

15 lines
747 B
Bash
Executable file

#!/usr/bin/env bash
# Generate code coverage reports for uploading to Azure Pipelines and codecov.io.
set -o pipefail -eu
PATH="${PWD}/bin:${PATH}"
if ! ansible-test --help >/dev/null 2>&1; then
# Install the devel version of ansible-test for generating code coverage reports.
# This is only used by Ansible Collections, which are typically tested against multiple Ansible versions (in separate jobs).
# Since a version of ansible-test is required that can work the output from multiple older releases, the devel version is used.
pip install https://github.com/ansible/ansible/archive/devel.tar.gz --disable-pip-version-check
fi
ansible-test coverage xml --group-by command --stub --venv --venv-system-site-packages --color -v