diff --git a/.ci/check_controller.sh b/.ci/check_controller.sh new file mode 100644 index 00000000000..73e3931a7b9 --- /dev/null +++ b/.ci/check_controller.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +MAX_LINE_COUNT=19900 +project_dir=`dirname $0`/.. +cd $project_dir +bash -c "[ `find lib/galaxy/webapps/galaxy/controllers/ -name '*.py' | xargs wc -l | tail -n 1 | awk '{ printf \$1; }'` -lt $MAX_LINE_COUNT ]" diff --git a/.ci/check_mako.sh b/.ci/check_mako.sh new file mode 100644 index 00000000000..0c0fb773ff4 --- /dev/null +++ b/.ci/check_mako.sh @@ -0,0 +1,6 @@ +#!/bin/bash +set -e +MAX_MAKO_COUNT=330 +project_dir=`dirname $0`/.. +cd $project_dir +bash -c "[ `find templates -iname '*.mako' | wc -l | cut -f1 -d' '` -lt $MAX_MAKO_COUNT ]" diff --git a/tox.ini b/tox.ini index 24bf4de692e..7b102d7a642 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,8 @@ [tox] -envlist = py27-lint, py26-lint, py27-unit, py26-unit, qunit +envlist = py27-lint, py26-lint, py27-unit, py26-unit, qunit, mako-count, web-controller-line-count skipsdist = True + [testenv:py27-lint] commands = bash .ci/flake8_wrapper.sh whitelist_externals = bash @@ -32,3 +33,11 @@ deps = [testenv:qunit] commands = bash run_tests.sh -q whitelist_externals = bash + +[testenv:mako-count] +commands = bash .ci/check_mako.sh +whitelist_externals = bash + +[testenv:web-controller-line-count] +commands = bash .ci/check_controller.sh +whitelist_externals = bash