2017-11-03 17:31:40 +03:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
|
|
|
# Make non-zero exit codes & other errors fatal.
|
|
|
|
set -euo pipefail
|
2015-05-14 18:43:05 +03:00
|
|
|
|
2017-07-26 13:04:03 +03:00
|
|
|
echo "Running pip check"
|
2017-11-03 17:31:40 +03:00
|
|
|
pip check
|
2017-07-26 13:04:03 +03:00
|
|
|
|
2019-02-28 22:52:22 +03:00
|
|
|
echo "Checking CELERY_TASK_QUEUES matches Procfile"
|
2019-02-21 10:38:24 +03:00
|
|
|
python -bb ./lints/queuelint.py
|
2016-03-09 16:24:32 +03:00
|
|
|
|
2015-03-14 03:06:03 +03:00
|
|
|
echo "Running flake8"
|
2019-05-17 00:56:02 +03:00
|
|
|
flake8 --show-source || { echo "flake8 errors found!"; exit 1; }
|
2015-03-14 03:06:03 +03:00
|
|
|
|
2015-09-22 00:06:58 +03:00
|
|
|
echo "Running isort"
|
|
|
|
isort --check-only --diff --quiet \
|
|
|
|
|| { echo "isort errors found! Run 'isort' with no options to fix."; exit 1; }
|
|
|
|
|
2017-11-03 18:58:56 +03:00
|
|
|
echo "Running shellcheck"
|
|
|
|
git grep -El '^#!/.+\b(bash|sh)\b' | xargs shellcheck
|
|
|
|
|
2019-05-17 00:56:02 +03:00
|
|
|
echo "Running test docs generation"
|
|
|
|
mkdocs build
|
|
|
|
|
2016-05-03 16:41:40 +03:00
|
|
|
echo "Running Django system checks"
|
|
|
|
# See .travis.yml for explanation of the environment variable overriding.
|
2019-02-21 10:38:24 +03:00
|
|
|
SITE_URL="https://treeherder.dev" TREEHERDER_DEBUG="False" python -bb ./manage.py check --deploy --fail-level WARNING
|
2016-05-03 16:41:40 +03:00
|
|
|
|
2015-03-14 03:06:03 +03:00
|
|
|
echo "Running Python tests"
|
2019-05-17 00:56:02 +03:00
|
|
|
python -bb -m pytest tests/
|