Changed structure - everything is the same job

This commit is contained in:
Shay Nehmad 2019-11-07 16:24:36 +02:00
parent 54fd1d7744
commit c2ba6ce46c
1 changed files with 44 additions and 57 deletions

View File

@ -1,8 +1,5 @@
# Infection Monkey travis.yml. See Travis documentation for information about this file structure.
jobs:
include:
# The python job
-
group: travis_latest
language: python
@ -20,6 +17,11 @@ jobs:
- pip install -r monkey/infection_monkey/requirements_linux.txt # for unit tests
before_script:
# Set the server config to `testing`, for the UTs to use mongomaock and pass.
- python monkey/monkey_island/cc/set_server_config.py testing
script:
# Check Python code
# Check syntax errors and fail the build if any are found.
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics
@ -35,13 +37,14 @@ jobs:
- 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
# Set the server config to `testing`, for the UTs to use mongomaock and pass.
- python monkey/monkey_island/cc/set_server_config.py testing
script:
- 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
- cd monkey_island/cc/ui
- eslint ./src --quiet
- eslint ./src --max-warnings 100
notifications:
slack: # Notify to slack
rooms:
@ -51,19 +54,3 @@ jobs:
email:
on_success: change
on_failure: always
# The JS job
-
group: travis_latest
language: node_js
cache:
directories:
- "node_modules"
sudo: false
script:
- pwd
- cd monkey_island/cc/ui
- pwd
- npm i -g eslint
- eslint ./src --quiet
- eslint ./src --max-warnings 100