mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-25 06:10:22 -07:00
Use antsibull-nox instead of extra sanity test runner and extra workflows (#10022)
* Use antsibull-nox instead of extra sanity test runner and extra workflows. * Avoid sys.argv[0].
This commit is contained in:
parent
4b9373f694
commit
3ee55c6828
28 changed files with 302 additions and 655 deletions
|
@ -16,11 +16,6 @@ else
|
|||
base_branch=""
|
||||
fi
|
||||
|
||||
if [ "${group}" == "extra" ]; then
|
||||
../internal_test_tools/tools/run.py --color --bot --junit
|
||||
exit
|
||||
fi
|
||||
|
||||
case "${group}" in
|
||||
1) options=(--skip-test pylint --skip-test ansible-doc --skip-test validate-modules) ;;
|
||||
2) options=( --test ansible-doc --test validate-modules) ;;
|
||||
|
@ -28,17 +23,6 @@ case "${group}" in
|
|||
4) options=(--test pylint --exclude plugins/modules/) ;;
|
||||
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
|
||||
ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
|
||||
--docker --base-branch "${base_branch}" \
|
||||
|
|
|
@ -67,10 +67,6 @@ fi
|
|||
|
||||
export ANSIBLE_COLLECTIONS_PATHS="${PWD}/../../../"
|
||||
|
||||
if [ "${test}" == "sanity/extra" ]; then
|
||||
retry pip install junit-xml --disable-pip-version-check
|
||||
fi
|
||||
|
||||
# START: HACK install dependencies
|
||||
|
||||
# Nothing further should be added to this list.
|
||||
|
@ -79,7 +75,7 @@ retry git clone --depth=1 --single-branch https://github.com/ansible-collections
|
|||
# NOTE: we're installing with git to work around Galaxy being a huge PITA (https://github.com/ansible/galaxy/issues/2429)
|
||||
# retry ansible-galaxy -vvv collection install community.internal_test_tools
|
||||
|
||||
if [ "${script}" != "sanity" ] && [ "${script}" != "units" ] && [ "${test}" != "sanity/extra" ]; then
|
||||
if [ "${script}" != "sanity" ] && [ "${script}" != "units" ]; then
|
||||
# To prevent Python dependencies on other collections only install other collections for integration tests
|
||||
retry git clone --depth=1 --single-branch https://github.com/ansible-collections/ansible.posix.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/ansible/posix"
|
||||
retry git clone --depth=1 --single-branch https://github.com/ansible-collections/community.crypto.git "${ANSIBLE_COLLECTIONS_PATHS}/ansible_collections/community/crypto"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue