Add extra sanity tests (#43)

* Prepare extra sanity tests.

* Run some extra sanity tests.

* Linting.

* Experimenting

* Linting.

* Run tests in docker container.

* Improve run code.

* Use requests instead of Ansible code (which needs to be installed first).

* Refactor and add more debugging.

* More ls.

* More ls.

* More ls in container.

* Copy cwd into container.

* Improve container handling.

* Make tests configurable.

* Using proper argument parser.

* Add colors.

* Allow to disable test.

* Always run all tests for now. (Change detection needs to know about git I think).

* Use argument parser for main executable. Force colors for CI.

* Allow to specify targets.

* Linting.

* Switch to ansibulled-changelog.

* Use runner from community.internal_test_tools (current dev branch for runner).

* Clone official repository instead of my fork/branch.
This commit is contained in:
Felix Fontein
2020-05-16 14:05:03 +02:00
committed by GitHub
parent caf2ee2d6a
commit a8fb38f74a
9 changed files with 283 additions and 0 deletions

View File

@@ -2,12 +2,25 @@
set -o pipefail -eux
declare -a args
IFS='/:' read -ra args <<< "$1"
group="${args[1]}"
if [ "${BASE_BRANCH:-}" ]; then
base_branch="origin/${BASE_BRANCH}"
else
base_branch=""
fi
if [ "${group}" == "extra" ]; then
# ansible-galaxy -vvv collection install community.internal_test_tools
git clone --single-branch --depth 1 https://github.com/ansible-collections/community.internal_test_tools.git ../internal_test_tools
../internal_test_tools/tools/run.py --color
exit
fi
# shellcheck disable=SC2086
ansible-test sanity --color -v --junit ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} \
--docker --base-branch "${base_branch}" \