forked from Netflix/security_monkey
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
92 lines (76 loc) · 2.94 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
# Travis YAML file for Security Monkey.
# Only way to get multiple builds to work without having the "default" job working was to
# duplicate everything :/ See: https://github.com/travis-ci/travis-ci/issues/4681
matrix:
include:
##### UNIT TEST JOB #####
- dist: trusty
sudo: required
language: python
python: "2.7"
env:
- UNIT_TEST_JOB=true
- PIP_DOWNLOAD_CACHE=".pip_download_cache"
- SECURITY_MONKEY_SETTINGS=`pwd`/env-config/config.py
addons:
postgresql: "9.4"
before_script:
- psql -c "CREATE DATABASE secmonkey;" -U postgres
- psql -c "CREATE ROLE securitymonkeyuser LOGIN PASSWORD 'securitymonkeypassword';" -U postgres
- psql -c "CREATE SCHEMA secmonkey GRANT Usage, Create ON SCHEMA secmonkey TO securitymonkeyuser;" -U postgres
- psql -c "set timezone TO 'GMT';" -U postgres
- python setup.py develop
- pip install .[tests]
- pip install coveralls
- monkey db upgrade
- monkey amazon_accounts
before_install:
- sudo mkdir -p /var/log/security_monkey/
- sudo touch /var/log/security_monkey/securitymonkey.log
- sudo chown travis /var/log/security_monkey/securitymonkey.log
install:
- sed -i '/WTF_CSRF_ENABLED = True/c\WTF_CSRF_ENABLED = False' `pwd`/env-config/config.py
- pip install bandit
- pip install pylint
script:
- coverage run -a -m py.test security_monkey/tests/auditors || exit 1
- coverage run -a -m py.test security_monkey/tests/watchers || exit 1
- coverage run -a -m py.test security_monkey/tests/core || exit 1
- coverage run -a -m py.test security_monkey/tests/views || exit 1
- coverage run -a -m py.test security_monkey/tests/interface || exit 1
- coverage run -a -m py.test security_monkey/tests/utilities || exit 1
- bandit -r -ll -ii -x security_monkey/tests .
- pylint -E -d E1101,E0611,F0401 --ignore=service.py,datastore.py,datastore_utils.py,watcher.py security_monkey
after_success:
- coveralls
- coverage report
#####################################################
##### BUILD DOCKER CONTAINER JOB #####
- dist: trusty
sudo: required
language: python
python: "2.7"
env:
- BUILD_DOCKER=True
- DOCKER_COMPOSE_VERSION=1.11.2
- PIP_DOWNLOAD_CACHE=".pip_download_cache"
- SECURITY_MONKEY_SETTINGS=`pwd`/env-config/config.py
services:
- docker
script:
- docker-compose --version
- docker-compose build
#####################################################
##### TEST DART JOB #####
- dist: trusty
env: DART_TEST=True
script: sh env_tests/test_dart.sh
#####################################################
cache:
directories:
- .pip_download_cache
notifications:
email: