AZP Coverage support for Ansible 2.9 (#51)

Pull in latest changes from shippable-migration-tool
ci_complete ci_coverage
This commit is contained in:
John R Barker
2020-12-16 11:42:20 +00:00
committed by GitHub
parent 8bd33b06c4
commit c549e7a1cd
2 changed files with 12 additions and 2 deletions
@@ -12,4 +12,9 @@ mkdir "${agent_temp_directory}/coverage/"
options=(--venv --venv-system-site-packages --color -v)
ansible-test coverage combine --export "${agent_temp_directory}/coverage/" "${options[@]}"
ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}"
if ansible-test coverage analyze targets generate --help >/dev/null 2>&1; then
# Only analyze coverage if the installed version of ansible-test supports it.
# Doing so allows this script to work unmodified for multiple Ansible versions.
ansible-test coverage analyze targets generate "${agent_temp_directory}/coverage/coverage-analyze-targets.json" "${options[@]}"
fi