2019-10-28 19:54:07 +08:00
|
|
|
# Infection Monkey travis.yml. See Travis documentation for information about this file structure.
|
|
|
|
|
2018-05-07 23:19:28 +08:00
|
|
|
group: travis_latest
|
|
|
|
language: python
|
|
|
|
cache: pip
|
|
|
|
python:
|
2019-10-27 18:13:26 +08:00
|
|
|
- 3.7
|
2018-05-07 23:19:28 +08:00
|
|
|
install:
|
2019-10-28 19:54:07 +08:00
|
|
|
- pip install -r monkey/monkey_island/requirements.txt # for unit tests
|
|
|
|
- pip install flake8 pytest dlint # for next stages
|
|
|
|
- pip install -r monkey/infection_monkey/requirements_linux.txt # for unit tests
|
2018-05-07 23:19:28 +08:00
|
|
|
before_script:
|
2019-10-28 19:54:07 +08:00
|
|
|
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics # Check syntax errors
|
|
|
|
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics # warn about linter issues. --exit-zero
|
|
|
|
# means this stage will not fail the build. This is (hopefully) a temporary measure until all warnings are suppressed.
|
|
|
|
- python monkey/monkey_island/cc/set_server_config.py testing # Set the server config to `testing`, for the UTs to use
|
|
|
|
# mongomaock and pass.
|
2018-05-07 23:19:28 +08:00
|
|
|
script:
|
2019-10-27 19:48:09 +08:00
|
|
|
- cd monkey # This is our source dir
|
2019-10-28 00:31:44 +08:00
|
|
|
- python -m pytest # Have to use `python -m pytest` instead of `pytest` to add "{$builddir}/monkey/monkey" to sys.path.
|
2018-05-07 23:19:28 +08:00
|
|
|
notifications:
|
2019-10-28 19:54:07 +08:00
|
|
|
slack: # Notify to slack
|
2019-10-27 18:29:52 +08:00
|
|
|
rooms:
|
2019-10-28 19:54:07 +08:00
|
|
|
- infectionmonkey:QaXbsx4g7tHFJW0lhtiBmoAg#ci # room: #ci
|
|
|
|
on_success: change
|
2019-10-27 18:29:52 +08:00
|
|
|
on_failure: always
|
2019-10-28 00:31:44 +08:00
|
|
|
email:
|
|
|
|
on_success: change
|
|
|
|
on_failure: always
|