Permalink
Browse files

split linting and testing into travis jobs

  • Loading branch information...
1 parent e3865e0 commit b77bdee54f528cfe4965ef41dc27105123ea5dec @sokra sokra committed Nov 22, 2016
Showing with 32 additions and 15 deletions.
  1. +4 −0 .editorconfig
  2. +26 −13 .travis.yml
  3. +2 −2 package.json
View
@@ -12,6 +12,10 @@ max_line_length = 233
indent_style = space
indent_size = 2
+[*.yml]
+indent_style = space
+indent_size = 2
+
[test/cases/parsing/bom/bomfile.{css,js}]
charset = utf-8-bom
View
@@ -6,24 +6,37 @@ cache:
- $HOME/.npm
- $HOME/.yarn-cache
-os:
- - linux
- - osx
-node_js:
- - "7"
- - "6"
- - "4"
- - "v0.12.17"
-
matrix:
+ include:
+ - os: linux
+ node_js: "7"
+ env: NO_WATCH_TESTS=1 JOB_PART=lint
+ - os: linux
+ node_js: "7"
+ env: NO_WATCH_TESTS=1 JOB_PART=test
+ - os: linux
+ node_js: "6"
+ env: NO_WATCH_TESTS=1 JOB_PART=test
+ - os: linux
+ node_js: "4"
+ env: NO_WATCH_TESTS=1 JOB_PART=test
+ - os: linux
+ node_js: "v0.12.17"
+ env: NO_WATCH_TESTS=1 JOB_PART=test
+ - os: osx
+ node_js: "7"
+ env: NO_WATCH_TESTS=1 JOB_PART=test
+ - os: osx
+ node_js: "6"
+ env: NO_WATCH_TESTS=1 JOB_PART=test
+ - os: osx
+ node_js: "4"
+ env: NO_WATCH_TESTS=1 JOB_PART=test
allow_failures:
- - node_js: "4"
- node_js: "v0.12.17"
- os: osx
-script: npm run travis
-env:
- - NO_WATCH_TESTS=1
+script: npm run travis:$JOB_PART
before_install: if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi
install:
View
@@ -83,11 +83,11 @@
],
"scripts": {
"test": "mocha --harmony --check-leaks",
- "travis": "npm run cover -- --report lcovonly",
+ "travis:test": "npm run cover -- --report lcovonly",
+ "travis:lint": "npm run lint-files && npm run nsp",
"appveyor": "node --max_old_space_size=4096 node_modules\\mocha\\bin\\mocha --harmony",
"build:examples": "cd examples && node buildAll.js",
"pretest": "npm run lint-files",
- "postcover": "npm run lint-files && npm run nsp",
"lint-files": "npm run lint && npm run beautify-lint",
"lint": "eslint lib bin hot",
"beautify-lint": "beautify-lint lib/**/*.js hot/**/*.js bin/**/*.js benchmark/*.js test/*.js",

0 comments on commit b77bdee

Please sign in to comment.