Skip to content

Commit

Permalink
Merge pull request #50 from jason-fox/feature/tidy-travis
Browse files Browse the repository at this point in the history
Split Docs and Unit Test into separate jobs
  • Loading branch information
fgalan committed Mar 6, 2019
2 parents 306ecfb + 1342bd4 commit 71e993a
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 18 deletions.
53 changes: 36 additions & 17 deletions .travis.yml
@@ -1,30 +1,49 @@
language: node_js

sudo: required

node_js:
- "8"
- "10"

branches:
only:
- master

services:
- docker

install:
- npm install
jobs:
include:
- stage: test
name: "Unit Tests: Node 8"
node_js: 8

before_install:
- docker pull telefonicaiot/fiware-orion
- docker run --name mongodb -d mongo:3.4
- docker run --name orion -d --link mongodb:mongodb -p 10026:1026 telefonicaiot/fiware-orion -dbhost mongodb

before_script:
- npm run lint

after_script:
- npm run test:coveralls

- stage: test
name: "Unit Tests: Node 10"
node_js: 10

before_install:
- docker pull telefonicaiot/fiware-orion
- docker run --name mongodb -d mongo:3.4
- docker run --name orion -d --link mongodb:mongodb -p 10026:1026 telefonicaiot/fiware-orion -dbhost mongodb

before_script:
- npm run lint

before_install:
- docker pull telefonicaiot/fiware-orion
- docker run --name mongodb -d mongo:3.4
- docker run --name orion -d --link mongodb:mongodb -p 10026:1026 telefonicaiot/fiware-orion -dbhost mongodb
after_script:
- npm run test:coveralls

before_script:
- npm run lint
- npm run lint:md
- npm run lint:text
- stage: test
name: "Documentation Tests"
node_js: 10

after_script:
- npm run test:coveralls
script:
- npm run lint:md
- npm run lint:text
11 changes: 10 additions & 1 deletion package.json
Expand Up @@ -22,7 +22,7 @@
"scripts": {
"clean": "rm -rf package-lock.json && rm -rf node_modules && rm -rf coverage",
"lint": "jshint lib/ --config .jshintrc && jshint test/ --config test/.jshintrc",
"lint:md": "remark 'README.md' docs",
"lint:md": "remark -f 'README.md' docs",
"lint:text": "textlint 'README.md' 'docs/*.md' 'docs/**/*.md'",
"prettier": "prettier --config .prettierrc.json --write ./**/**/*.js **/*.js *.js",
"prettier:text": "prettier 'README.md' 'docs/*.md' 'docs/**/*.md' --no-config --tab-width 4 --print-width 120 --write --prose-wrap always",
Expand Down Expand Up @@ -82,5 +82,14 @@
"prettier --no-config --write",
"git add"
]
},
"remarkConfig": {
"settings": {
"bullet": "-",
"paddedTable": true
},
"plugins": [
"remark-preset-lint-recommended"
]
}
}

0 comments on commit 71e993a

Please sign in to comment.