mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-08 06:12:51 +00:00
Improve on-demand coverage for Shippable.
This commit is contained in:
@@ -2,7 +2,13 @@
|
||||
|
||||
set -o pipefail
|
||||
|
||||
ansible-test network-integration --explain 2>&1 | { grep ' network-integration: .* (targeted)$' || true; } > /tmp/network.txt
|
||||
# shellcheck disable=SC2086
|
||||
ansible-test network-integration --explain ${CHANGED:+"$CHANGED"} 2>&1 | { grep ' network-integration: .* (targeted)$' || true; } > /tmp/network.txt
|
||||
|
||||
if [ "${COVERAGE}" ]; then
|
||||
# when on-demand coverage is enabled, force tests to run for all network platforms
|
||||
echo "coverage" > /tmp/network.txt
|
||||
fi
|
||||
|
||||
target="network/ci/"
|
||||
|
||||
@@ -13,7 +19,7 @@ if [ -s /tmp/network.txt ]; then
|
||||
echo "Running network integration tests for multiple platforms concurrently."
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} \
|
||||
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
|
||||
--platform vyos/1.1.0 \
|
||||
--platform ios/csr1000v \
|
||||
|
||||
@@ -22,6 +28,6 @@ else
|
||||
echo "Running network integration tests for a single platform only."
|
||||
|
||||
# shellcheck disable=SC2086
|
||||
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} \
|
||||
ansible-test network-integration --color -v --retry-on-error "${target}" --requirements ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
|
||||
--platform vyos/1.1.0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user