forked from FIWARE/data-models
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (44 loc) · 1.58 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
language: python
cache: pip
python:
- 2.7
- 3.6
install:
- pip install flake8
before_script:
# stop the build if there are Python syntax errors, PEP8 violations, undefined names
- flake8 . --count --select=E,F821,F822,F823 --max-line-length=127 --show-source --statistics
# exit-zero treats all errors as warnings. GitHub editor is 127 chars wide
- flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
script:
- true # add other tests here
matrix:
include:
- language: node_js
python:
node_js:
- 8
install:
## linters for json and JavaScript files
- npm i -g eslint --save-dev
- npm install eslint-plugin-json --save-dev -g
- npm install -g jshint
## Data model validator
- npm install -g fiware-model-validator
- sudo apt-get remove -y docker docker-engine docker.io
- sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
- 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 -qq update
- sudo apt-get install -y docker-ce
- docker run --name mongodb -d mongo:3.4
- docker run -d --name orion1 --link mongodb:mongodb -p 1026:1026 fiware/orion -dbhost mongodb
before_script:
- eslint --ext .json .
- jshint .
- validate -p . -c true
script:
- true
notifications:
on_success: change
on_failure: always