treeherder/runtests.sh

30 строки
851 B
Bash
Исходник Обычный вид История

#!/usr/bin/env bash
# Make non-zero exit codes & other errors fatal.
set -euo pipefail
echo "Running pip check"
pip check
Bug 1337717 - Update to newer Celery, Kombu, py-amqp and billiard (#4722) Updating in one go, since the Celery 4 release only supports the newer versions of its dependencies and vice versa. Of note, this fixes the unhelpful connection error messages shown when in fact there was an authentication problem, and brings Celery/Kombu support for Python 3.7. It's also likely that this will fix the pulse listener hang seen in bug 1529404. The new Celery release has renamed a number of the settings. Most changes were performed by running: ``` celery upgrade settings treeherder/config/settings.py --django celery upgrade settings tests/settings.py --django ``` The Django integration in celery.py has been cleaned up by following: https://celery.readthedocs.io/en/latest/django/first-steps-with-django.html The bug being hit that caused this to be reverted back in #2119/bug 1333079 was due to Celery 4 no longer supporting calling `apply_async()` with just the `routing_key` - it now has to be called with either just the `queue`, or else both the `routing_key` and `queue`, otherwise the task ends up in the `default` queue. Sadly this isn't mentioned in the Celery breaking changes list - I'll file an upstream issue shortly. Changes: http://docs.celeryproject.org/en/master/history/whatsnew-4.0.html http://docs.celeryproject.org/en/master/changelog.html#rc1 https://github.com/celery/celery/compare/v3.1.26...v4.3.0rc1 http://docs.celeryproject.org/projects/kombu/en/stable/changelog.html#version-4-3-0 https://github.com/celery/kombu/compare/v3.0.37...v4.3.0 https://amqp.readthedocs.io/en/stable/changelog.html https://github.com/celery/py-amqp/compare/v1.4.9...v2.4.1 https://github.com/celery/billiard/blob/v3.6.0/CHANGES.txt https://github.com/celery/billiard/compare/v3.3.0.23...v3.6.0
2019-02-28 22:52:22 +03:00
echo "Checking CELERY_TASK_QUEUES matches Procfile"
python -bb ./lints/queuelint.py
echo "Running flake8"
flake8 --show-source || { echo "flake8 errors found!"; exit 1; }
echo "Running isort"
isort --check-only --diff --quiet \
|| { echo "isort errors found! Run 'isort' with no options to fix."; exit 1; }
echo "Running shellcheck"
git grep -El '^#!/.+\b(bash|sh)\b' | xargs shellcheck
echo "Running test docs generation"
mkdocs build
echo "Running Django system checks"
# See .travis.yml for explanation of the environment variable overriding.
SITE_URL="https://treeherder.dev" TREEHERDER_DEBUG="False" python -bb ./manage.py check --deploy --fail-level WARNING
echo "Running Python tests"
python -bb -m pytest tests/