forked from FIWARE/data-models
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
80 lines (68 loc) · 3.27 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
language: python
sudo: required
dist: xenial
cache: pip
jobs:
include:
- stage: test
name: "Unit Tests 2.7"
python: 2.7
node_js: 10
before_install:
- pip install flake8
# 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 --exclude *_weather_*
# 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
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.6
- docker run -d --name orion1 --link mongodb:mongodb -p 1026:1026 fiware/orion -dbhost mongodb
before_script:
- npm run lint -C ./validator
script:
- node ./validator/validate.js -i common-schema.json -i geometry-schema.json -i specs/Weather/weather-schema.json -i specs/Alert/alert-schema.json -i specs/AgriFood/agrifood-schema.json -p specs -c true
- stage: test
name: "Unit Tests 3.7"
python: 3.7
node_js: 10
before_install:
- pip install flake8
# 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
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
script:
- node ./validator/validate.js -i common-schema.json -i geometry-schema.json -i specs/Weather/weather-schema.json -i specs/Alert/alert-schema.json -i specs/AgriFood/agrifood-schema.json -p specs -c true
- stage: test
name: "Documentation Tests"
language: node_js
node_js: 10
install:
- npm install -C ./validator
script:
- npm run lint:md -C ./validator
- npm run lint:text -C ./validator
notifications:
on_success: change
on_failure: always