mirror of https://github.com/zulip/zulip.git
travis: Merge the static-analysis build into backend.
[Tweaked by gnprice to leave the use of --linecoverage-report unmodified for now.]
This commit is contained in:
parent
a4bcf1a64b
commit
6ef55145f5
|
@ -45,8 +45,6 @@ matrix:
|
|||
# that doesn't seem to be documented, but it's what we see empirically.
|
||||
# We only get 4 jobs running at a time, so we try to make the first few
|
||||
# the most likely to break.
|
||||
- python: "3.4"
|
||||
env: TEST_SUITE=static-analysis
|
||||
- python: "3.4"
|
||||
env: TEST_SUITE=frontend
|
||||
- python: "3.4"
|
||||
|
|
|
@ -28,7 +28,7 @@ You can learn more about it at:
|
|||
* [Using mypy with Python 2 code](http://mypy.readthedocs.io/en/latest/python2.html)
|
||||
|
||||
The mypy type checker is run automatically as part of Zulip's Travis
|
||||
CI testing process in the 'static-analysis' build.
|
||||
CI testing process in the `backend` build.
|
||||
|
||||
## `type_debug.py`
|
||||
|
||||
|
|
|
@ -34,9 +34,6 @@ function run {
|
|||
run ./tools/check-provision $FORCEARG
|
||||
run ./tools/clean-repo
|
||||
|
||||
# travis/static-analysis
|
||||
run ./tools/run-mypy
|
||||
|
||||
# travis/backend
|
||||
run ./tools/lint $FORCEARG
|
||||
run ./manage.py makemessages --locale en
|
||||
|
@ -44,6 +41,7 @@ run env PYTHONWARNINGS=ignore ./tools/check-capitalization --no-generate
|
|||
run env PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate
|
||||
run ./tools/test-tools
|
||||
run ./tools/test-backend $FORCEARG
|
||||
run ./tools/run-mypy
|
||||
run ./tools/test-migrations
|
||||
# Not running SVG optimizing since it's low-churn
|
||||
# run ./tools/optimize-svg
|
||||
|
|
|
@ -12,6 +12,11 @@ PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate
|
|||
|
||||
./tools/test-tools
|
||||
./tools/test-backend --coverage
|
||||
|
||||
# We run mypy after the backend tests so we get output from the
|
||||
# backend tests, which tend to uncover more serious problems, first.
|
||||
./tools/run-mypy --linecoverage-report
|
||||
|
||||
./tools/test-migrations
|
||||
./tools/optimize-svg
|
||||
./tools/test-documentation
|
||||
|
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
set -x
|
||||
|
||||
# We only need the mypy checker in this build, so we just install that
|
||||
# directly, skipping provision.
|
||||
|
||||
if ! pip install --no-deps -r requirements/mypy.txt; then
|
||||
echo "\`pip install --no-deps -r requirements/mypy.txt\`: Failure occured while trying to perform dependancy installation, Retrying..."
|
||||
pip install --no-deps -r requirements/mypy.txt
|
||||
fi
|
|
@ -1,23 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
set -x
|
||||
|
||||
retcode=0
|
||||
./tools/run-mypy --linecoverage-report || retcode=1
|
||||
set +x
|
||||
if [ "$retcode" == "0" ]; then
|
||||
echo "The mypy static type checker for python detected no errors!"
|
||||
else
|
||||
echo
|
||||
echo "The mypy static type checker for Python threw some errors,"
|
||||
echo "which indicates a bug in your code or incorrect type annotations."
|
||||
echo "Please see http://zulip.readthedocs.io/en/latest/mypy.html for details"
|
||||
echo "on mypy, how Zulip is using mypy, and how to debug common issues."
|
||||
exit "$retcode"
|
||||
fi
|
||||
set -x
|
||||
|
||||
# NB: Everything here should be in `tools/test-all`. If there's a
|
||||
# reason not to run it there, it should be there as a comment
|
||||
# explaining why.
|
Loading…
Reference in New Issue