Add support for on-demand coverage on Shippable.

Triggered by setting the COVERAGE environment var to a non-empty value.
Alternatively the string `ci_coverage` can be added to a commit message.
This commit is contained in:
Matt Clay
2017-05-07 16:32:19 +08:00
parent dfd19a812f
commit 7b3f0b8870
8 changed files with 17 additions and 10 deletions

View File

@@ -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