diff --git a/.travis.yml b/.travis.yml index f291b2876..e2b4f6737 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,6 +18,17 @@ install: - pip install coverage # for code coverage - pip install -r monkey/infection_monkey/requirements.txt # for unit tests +# node + npm + eslint +- node --version +- npm --version +# Install NVM, see https://github.com/nvm-sh/nvm#installing-and-updating +- curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash +- nvm install node +- nvm use node +- npm i -g eslint +- node --version +- npm --version + before_script: # Set the server config to `testing`. This is required for for the UTs to pass. - python monkey/monkey_island/cc/set_server_config.py testing @@ -49,12 +60,9 @@ script: # 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 --quiet # Test for errors - JS_WARNINGS_AMOUNT_UPPER_LIMIT=490 -- eslint ./src --max-warnings $JS_WARNINGS_AMOUNT_UPPER_LIMIT +- eslint ./src --max-warnings $JS_WARNINGS_AMOUNT_UPPER_LIMIT # Test for max warnings after_success: # Upload code coverage results to codecov.io, see https://github.com/codecov/codecov-bash for more information