Implement on-demand coverage on Shippable. (#24535)

pull/24587/head
Matt Clay 8 years ago committed by GitHub
parent eb5e906014
commit 5cb5228cde

@ -8,4 +8,5 @@ IFS='/:' read -ra args <<< "${TEST}"
image="ansible/ansible:${args[1]}"
target="posix/ci/cloud/"
ansible-test integration --color -v --retry-on-error "${target}" --docker "${image}"
# shellcheck disable=SC2086
ansible-test integration --color -v --retry-on-error "${target}" --docker "${image}" ${COVERAGE:+"$COVERAGE"}

@ -9,4 +9,5 @@ platform="${args[0]}"
version="${args[1]}"
target="posix/ci/"
ansible-test integration --color -v --retry-on-error "${target}" --remote "${platform}/${version}" --exclude "posix/ci/cloud/"
# shellcheck disable=SC2086
ansible-test integration --color -v --retry-on-error "${target}" --remote "${platform}/${version}" --exclude "posix/ci/cloud/" ${COVERAGE:+"$COVERAGE"}

@ -8,4 +8,5 @@ IFS='/:' read -ra args <<< "${TEST}"
image="ansible/ansible:${args[1]}"
target="posix/ci/group${args[2]}/"
ansible-test integration --color -v --retry-on-error "${target}" --docker "${image}"
# shellcheck disable=SC2086
ansible-test integration --color -v --retry-on-error "${target}" --docker "${image}" ${COVERAGE:+"$COVERAGE"}

@ -12,7 +12,8 @@ if [ -s /tmp/network.txt ]; then
echo "Running network integration tests for multiple platforms concurrently."
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements \
# shellcheck disable=SC2086
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} \
--platform vyos/1.1.0 \
--platform ios/csr1000v \
@ -20,6 +21,7 @@ else
echo "No changes requiring integration tests specific to networking were detected."
echo "Running network integration tests for a single platform only."
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements \
# shellcheck disable=SC2086
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} \
--platform vyos/1.1.0
fi

@ -9,4 +9,6 @@ platform="${args[0]}"
version="${args[1]}"
target="posix/ci/"
ansible-test integration --color -v --retry-on-error "${target}" --remote "${platform}/${version}" --remote-terminate success --exclude "posix/ci/cloud/"
# shellcheck disable=SC2086
ansible-test integration --color -v --retry-on-error "${target}" --remote "${platform}/${version}" --remote-terminate success --exclude "posix/ci/cloud/" \
${COVERAGE:+"$COVERAGE"}

@ -10,8 +10,8 @@ retry.py pip install tox --disable-pip-version-check
echo '{"verified": false, "results": []}' > test/results/bot/ansible-test-failure.json
ansible-test compile --failure-ok --color -v --junit --requirements
ansible-test sanity --failure-ok --color -v --junit --tox --skip-test ansible-doc --python 3.5
ansible-test compile --failure-ok --color -v --junit --requirements --coverage
ansible-test sanity --failure-ok --color -v --junit --tox --skip-test ansible-doc --python 3.5 --coverage
ansible-test sanity --failure-ok --color -v --junit --tox --test ansible-doc --coverage
rm test/results/bot/ansible-test-failure.json

@ -23,6 +23,12 @@ pip list --disable-pip-version-check
export PATH="test/runner:${PATH}"
export PYTHONIOENCODING='utf-8'
export COVERAGE="${COVERAGE:-}"
# run integration coverage if 'ci_coverage' is in the commit message or the COVERAGE var is non-empty
if [[ "${COMMIT_MESSAGE}" =~ ci_coverage ]] || [ -n "${COVERAGE}" ]; then
export COVERAGE="--coverage"
fi
# remove empty core/extras module directories from PRs created prior to the repo-merge
find lib/ansible/modules -type d -empty -print -delete

@ -22,7 +22,8 @@ if [ -s /tmp/windows.txt ]; then
target="windows/ci/"
ansible-test windows-integration --color -v --retry-on-error "${target}" --requirements \
# shellcheck disable=SC2086
ansible-test windows-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} \
--windows 2008-SP2 \
--windows 2008-R2_SP1 \
--windows 2012-RTM \
@ -34,6 +35,7 @@ else
target="windows/ci/group${job}/"
ansible-test windows-integration --color -v --retry-on-error "${target}" --requirements \
# shellcheck disable=SC2086
ansible-test windows-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} \
--windows 2012-R2_RTM
fi

Loading…
Cancel
Save