forked from FIWARE/data-models
-
Notifications
You must be signed in to change notification settings - Fork 4
/
.travis.yml
41 lines (39 loc) · 1.52 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
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:
## Data model validator
- npm install -C ./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:
- npm run lint -C ./validator
- node ./validator/validate.js -i common-schema.json -i geometry-schema.json -i specs/Weather/weather-schema.json -i specs/Alert/alert-schema.json -p . -c true
script:
- true
notifications:
on_success: change
on_failure: always