Merge branch '393/python-3-ci' into 393/python-3-fix-linter-warnings

This commit is contained in:
Shay Nehmad 2019-10-28 13:54:48 +02:00
commit a9a3c7705e
1 changed files with 13 additions and 10 deletions

View File

@ -1,25 +1,28 @@
# Infection Monkey travis.yml. See Travis documentation for information about this file structure.
group: travis_latest group: travis_latest
language: python language: python
cache: pip cache: pip
python: python:
- 3.7 - 3.7
install: install:
- pip install -r monkey/monkey_island/requirements.txt - pip install -r monkey/monkey_island/requirements.txt # for unit tests
- pip install flake8 pytest dlint pylint - pip install flake8 pytest dlint # for next stages
- pip install -r monkey/infection_monkey/requirements_linux.txt - pip install -r monkey/infection_monkey/requirements_linux.txt # for unit tests
before_script: before_script:
- flake8 . --count --select=E901,E999,F821,F822,F823 --show-source --statistics - 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 - flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics # warn about linter issues. --exit-zero
- python monkey/monkey_island/cc/set_server_config.py testing # 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.
script: script:
- cd monkey # This is our source dir - 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. - python -m pytest # Have to use `python -m pytest` instead of `pytest` to add "{$builddir}/monkey/monkey" to sys.path.
notifications: notifications:
slack: slack: # Notify to slack
rooms: rooms:
- infectionmonkey:QaXbsx4g7tHFJW0lhtiBmoAg#ci - infectionmonkey:QaXbsx4g7tHFJW0lhtiBmoAg#ci # room: #ci
- infectionmonkey:QaXbsx4g7tHFJW0lhtiBmoAg#github on_success: change
on_success: always
on_failure: always on_failure: always
email: email:
on_success: change on_success: change