diff --git a/.travis.yml b/.travis.yml index f78223d4..1d4144c8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,15 +1,25 @@ sudo: false language: node_js -os: - - linux -# Test against Webpack supported NodeJS Versions ( >= 4.7 && !5.x, 6.x, 7.x) -node_js: - - node - - "6" +branches: + only: + - v2 env: - export WEBPACK_VERSION="2.2.0" matrix: fast_finish: true + include: + - os: linux + node_js: "7" + env: WEBPACK_VERSION="2.2.0" JOB_PART=lint + - os: linux + node_js: "6" + env: WEBPACK_VERSION="2.2.0" JOB_PART=test + - os: linux + node_js: "4.7" + env: WEBPACK_VERSION="2.2.0" JOB_PART=test + - os: linux + node_js: "7" + env: WEBPACK_VERSION="2.2.0" JOB_PART=test before_install: - nvm --version - node --version @@ -17,7 +27,6 @@ before_install: before_script: - 'if [ "$WEBPACK_VERSION" ]; then npm install webpack@^$WEBPACK_VERSION; fi' script: - - npm run build - - npm test + - npm run travis:$JOB_PART after_success: - bash <(curl -s https://codecov.io/bash) diff --git a/package.json b/package.json index 64023de9..569de8e3 100644 --- a/package.json +++ b/package.json @@ -14,6 +14,8 @@ "test.unit": "mocha --compilers js:babel-register --full-trace --check-leaks test/unit", "test.integration": "npm run build && karma start --single-run", "travis": "npm run test.unit && npm run test.integration", + "travis:test": "npm run test.unit", + "travis:lint": "npm run lint", "release": "standard-version", "release:tag:v2": "git push --follow-tags origin v2", "release:publish": "npm run build:release && npm publish --access public --tag",