forked from adulau/cve-search
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
82 lines (78 loc) · 2.55 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
language: python
cache: pip
jobs:
include:
- stage: unit tests
python: 3.6
script: pytest --cov-report term --cov=./ test/unit -v
services:
- redis-server
- mongodb
install:
- pip install -q -U pip
- pip install -q -r requirements.txt
- pushd sbin
- ./db_mgmt_json.py -p
- ./db_mgmt_cpe_dictionary.py -p
- popd
- stage: unit tests
python: nightly
script: pytest --cov-report term --cov=./ test/unit -v
services:
- redis-server
- mongodb
install:
- pip install -q -U pip
- pip install -q -r requirements.txt
- pushd sbin
- ./db_mgmt_json.py -p
- ./db_mgmt_cpe_dictionary.py -p
- popd
- stage: web tests
if: type = pull_request
python: 3.6
script: pytest test/web/ -v
services:
- docker
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
install:
- git clone https://github.com/cve-search/CVE-Search-Docker.git
- pushd CVE-Search-Docker
- pip install requests
- pip install beautifulsoup4
- pip install pytest
- docker-compose build --build-arg REPO=$TRAVIS_PULL_REQUEST_SLUG --build-arg BRANCH=$TRAVIS_PULL_REQUEST_BRANCH
- docker-compose up -d
- sleep 120
- popd
- stage: web tests
if: type = push
python: 3.6
script: pytest test/web/ -v
services:
- docker
before_install:
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
- sudo apt-get update
- sudo apt-get -y -o Dpkg::Options::="--force-confnew" install docker-ce
install:
- git clone https://github.com/cve-search/CVE-Search-Docker.git
- pushd CVE-Search-Docker
- pip install requests
- pip install beautifulsoup4
- pip install pytest
- docker-compose build
- docker-compose up -d
- sleep 120
- popd
notifications:
email:
on_success: change
on_failure: change
after_success:
- codecov