From b087886d1c2f909e5c9bc83db5f24f532b640ccb Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Sun, 27 Aug 2017 13:42:54 -0700 Subject: [PATCH] travis: Move i18n and capitalization linters to frontend. Since these usually result from changes to HTML templates and other frontend-side things, it seems better to group them with the frontend. [Tweaked by gnprice in whitespace and comments.] --- tools/test-all | 6 +++--- tools/travis/backend | 4 ---- tools/travis/frontend | 9 +++++++++ 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/tools/test-all b/tools/test-all index 9c9504f489..45a5ac234b 100755 --- a/tools/test-all +++ b/tools/test-all @@ -36,9 +36,6 @@ run ./tools/clean-repo # travis/backend run ./tools/lint $FORCEARG -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 run ./tools/test-tools run ./tools/test-backend $FORCEARG run ./tools/run-mypy @@ -56,6 +53,9 @@ run ./tools/test-api # travis/frontend run ./tools/test-js-with-node +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 run ./tools/test-js-with-casper $FORCEARG printf '\n\e[32mAll OK!\e[0m\n' diff --git a/tools/travis/backend b/tools/travis/backend index b82c538fdb..29c309a6e2 100755 --- a/tools/travis/backend +++ b/tools/travis/backend @@ -6,10 +6,6 @@ set -e set -x ./tools/lint --backend -./manage.py makemessages --locale en -PYTHONWARNINGS=ignore ./tools/check-capitalization --no-generate -PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate - ./tools/test-tools ./tools/test-backend --coverage diff --git a/tools/travis/frontend b/tools/travis/frontend index 0f5d51230f..0280b2c4be 100755 --- a/tools/travis/frontend +++ b/tools/travis/frontend @@ -6,7 +6,16 @@ set -e set -x ./tools/lint --frontend + +# Run the node tests first, since they're fast and deterministic ./tools/test-js-with-node --coverage + +# Check capitalization of strings +./manage.py makemessages --locale en +PYTHONWARNINGS=ignore ./tools/check-capitalization --no-generate +PYTHONWARNINGS=ignore ./tools/check-frontend-i18n --no-generate + +# Run the slower Casper tests last ./tools/test-js-with-casper # NB: Everything here should be in `tools/test-all`. If there's a