Improve sanity test handling in CI after migration.
This commit is contained in:
parent
7724fb8f33
commit
80561ccef0
1 changed files with 13 additions and 2 deletions
|
@ -16,11 +16,22 @@ fi
|
||||||
case "${group}" in
|
case "${group}" in
|
||||||
1) options=(--skip-test pylint --skip-test ansible-doc --skip-test docs-build --skip-test package-data --skip-test validate-modules) ;;
|
1) options=(--skip-test pylint --skip-test ansible-doc --skip-test docs-build --skip-test package-data --skip-test validate-modules) ;;
|
||||||
2) options=( --test ansible-doc --test docs-build --test package-data) ;;
|
2) options=( --test ansible-doc --test docs-build --test package-data) ;;
|
||||||
3) options=(--test pylint --exclude test/units/ --exclude lib/ansible/module_utils/ --exclude lib/ansible/modules/network/) ;;
|
3) options=(--test pylint --exclude test/units/ --exclude lib/ansible/module_utils/) ;;
|
||||||
4) options=(--test pylint test/units/ lib/ansible/module_utils/ lib/ansible/modules/network/) ;;
|
4) options=(--test pylint test/units/ lib/ansible/module_utils/) ;;
|
||||||
5) options=( --test validate-modules) ;;
|
5) options=( --test validate-modules) ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
# allow collection migration sanity tests for groups 3 and 4 to pass without updating this script during migration
|
||||||
|
network_path="lib/ansible/modules/network/"
|
||||||
|
|
||||||
|
if [ -d "${network_path}" ]; then
|
||||||
|
if [ "${group}" -eq 3 ]; then
|
||||||
|
options+=(--exclude "${network_path}")
|
||||||
|
elif [ "${group}" -eq 4 ]; then
|
||||||
|
options+=("${network_path}")
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# shellcheck disable=SC2086
|
# shellcheck disable=SC2086
|
||||||
ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
|
ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
|
||||||
--docker --docker-keep-git --base-branch "${base_branch}" \
|
--docker --docker-keep-git --base-branch "${base_branch}" \
|
||||||
|
|
Loading…
Reference in a new issue