diff --git a/.travis.yml b/.travis.yml index da11ed1d4..d637c54ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,20 +35,21 @@ script: # Display the linter issues - cat flake8_warnings.txt # Make sure that we haven't increased the amount of warnings. -- WARNINGS_AMOUNT_UPPER_LIMIT=190 -- if [ $(tail -n 1 flake8_warnings.txt) -gt $WARNINGS_AMOUNT_UPPER_LIMIT ]; then echo "Too many warnings! Failing this build. Lower the amount of linter errors in this and try again. " && exit 1; fi +- PYTHON_WARNINGS_AMOUNT_UPPER_LIMIT=190 +- if [ $(tail -n 1 flake8_warnings.txt) -gt $PYTHON_WARNINGS_AMOUNT_UPPER_LIMIT ]; then echo "Too many warnings! Failing this build. Lower the amount of linter errors in this and try again. " && exit 1; fi - cd monkey # This is our source dir - python -m pytest # Have to use `python -m pytest` instead of `pytest` to add "{$builddir}/monkey/monkey" to sys.path. -# Check JS code. The npm install must happen AFTER the flake8 because the node_modules folder will cause a lot of errors. +# Check JS code. The npm install must happen AFTER the flake8 because the node_modules folder will cause a lot of errors. - cd monkey_island/cc/ui - npm i - npm i -g eslint - cd - - cd monkey_island/cc/ui - eslint ./src --quiet -- eslint ./src --max-warnings 100 +- JS_WARNINGS_AMOUNT_UPPER_LIMIT=497 +- eslint ./src --max-warnings $JS_WARNINGS_AMOUNT_UPPER_LIMIT notifications: slack: # Notify to slack