2016-01-12 13:08:43 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
2012-11-14 21:25:20 +01:00
|
|
|
|
|
|
|
cd "$(dirname "$0")"/..
|
|
|
|
|
2017-01-01 13:37:38 +01:00
|
|
|
# read the options
|
2018-08-03 02:14:50 +02:00
|
|
|
TEMP=$(getopt -o f --long force -- "$@")
|
2017-01-01 13:37:38 +01:00
|
|
|
eval set -- "$TEMP"
|
|
|
|
|
|
|
|
# extract options.
|
|
|
|
while true ; do
|
|
|
|
case "$1" in
|
|
|
|
-f|--force)
|
|
|
|
FORCEARG="--force";
|
|
|
|
shift;;
|
|
|
|
--)
|
|
|
|
shift;
|
|
|
|
break;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
|
2012-11-14 21:25:20 +01:00
|
|
|
function run {
|
2013-08-09 17:29:31 +02:00
|
|
|
echo '----'
|
2018-08-03 02:14:50 +02:00
|
|
|
printf 'Running'
|
|
|
|
printf ' %q' "$@"
|
|
|
|
printf '\n'
|
2012-11-14 21:25:20 +01:00
|
|
|
if ! "$@"; then
|
2018-08-03 02:14:50 +02:00
|
|
|
printf '\n\e[31;1mFAILED\e[0m'
|
|
|
|
printf ' %q' "$@"
|
|
|
|
printf '\n'
|
2012-11-14 21:25:20 +01:00
|
|
|
exit 1
|
|
|
|
else
|
|
|
|
echo
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
2017-07-25 04:37:23 +02:00
|
|
|
# prep
|
2017-01-01 13:37:38 +01:00
|
|
|
run ./tools/check-provision $FORCEARG
|
2013-08-09 17:29:31 +02:00
|
|
|
run ./tools/clean-repo
|
2017-07-25 04:37:23 +02:00
|
|
|
|
|
|
|
# travis/backend
|
2017-08-30 00:21:55 +02:00
|
|
|
run ./tools/lint --backend $FORCEARG
|
2017-07-25 04:37:23 +02:00
|
|
|
run ./tools/test-tools
|
2017-01-01 13:37:38 +01:00
|
|
|
run ./tools/test-backend $FORCEARG
|
2017-10-04 20:54:23 +02:00
|
|
|
run ./tools/run-mypy $FORCEARG
|
2017-07-25 04:37:23 +02:00
|
|
|
run ./tools/test-migrations
|
2017-05-30 20:19:53 +02:00
|
|
|
# Not running SVG optimizing since it's low-churn
|
2018-08-10 00:39:15 +02:00
|
|
|
# run ./tools/setup/optimize-svg
|
2016-10-21 09:19:33 +02:00
|
|
|
# Not running documentation tests since it takes 20s and only tests documentation
|
|
|
|
# run ./tools/test-documentation
|
2017-10-09 12:00:05 +02:00
|
|
|
run ./tools/test-help-documentation $FORCEARG
|
2017-01-25 17:38:38 +01:00
|
|
|
run ./tools/test-api
|
2018-02-01 20:38:51 +01:00
|
|
|
# Not running requirements check locally, because slow and low-churn
|
|
|
|
# run ./tools/test-locked-requirements
|
2017-07-25 04:46:15 +02:00
|
|
|
# Not running run-dev tests locally; we never have
|
|
|
|
# run ./tools/test-run-dev
|
2017-07-25 04:37:23 +02:00
|
|
|
# Not running queue worker reload tests since it's low-churn code
|
|
|
|
# run ./tools/test-queue-worker-reload
|
|
|
|
|
|
|
|
# travis/frontend
|
2017-08-30 00:21:55 +02:00
|
|
|
run ./tools/lint --frontend $FORCEARG
|
2017-07-25 04:37:23 +02:00
|
|
|
run ./tools/test-js-with-node
|
2017-08-27 22:42:54 +02:00
|
|
|
run ./manage.py makemessages --locale en
|
|
|
|
run env PYTHONWARNINGS=ignore ./tools/check-capitalization --no-generate
|
|
|
|
run env PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate
|
2017-07-25 04:37:23 +02:00
|
|
|
run ./tools/test-js-with-casper $FORCEARG
|
|
|
|
|
2012-11-14 21:25:20 +01:00
|
|
|
printf '\n\e[32mAll OK!\e[0m\n'
|