Fix build problem

eslint and node incompatebility
This commit is contained in:
Shay Nehmad 2020-05-10 15:42:42 +03:00
parent bd18893089
commit 07330ff2f5
1 changed files with 13 additions and 5 deletions

View File

@ -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