Skip to content

Commit 6105dbc

Browse files
committed
use webpack 2 CI scripts
1 parent 18ed970 commit 6105dbc

File tree

4 files changed

+53
-15
lines changed

4 files changed

+53
-15
lines changed

.travis.yml

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,41 @@
11
sudo: false
22
language: node_js
3-
node_js:
4-
- "7"
5-
- "6"
6-
- "4.3"
7-
script: npm run travis
8-
env:
9-
- NO_WATCH_TESTS=1
3+
4+
branches:
5+
only:
6+
- master
7+
8+
cache:
9+
directories:
10+
- $HOME/.npm
11+
12+
matrix:
13+
include:
14+
- os: linux
15+
node_js: "7"
16+
env: NO_WATCH_TESTS=1 JOB_PART=lint
17+
- os: linux
18+
node_js: "7"
19+
env: NO_WATCH_TESTS=1 JOB_PART=test
20+
- os: linux
21+
node_js: "6"
22+
env: NO_WATCH_TESTS=1 JOB_PART=test
23+
- os: linux
24+
node_js: "4.3"
25+
env: NO_WATCH_TESTS=1 JOB_PART=test
26+
- os: osx
27+
node_js: "7"
28+
env: NO_WATCH_TESTS=1 JOB_PART=test
29+
allow_failures:
30+
- os: osx
31+
fast_finish: true
1032

1133
before_script:
1234
- npm link
1335
- npm link webpack
1436

37+
script: npm run travis:$JOB_PART
38+
1539
after_success:
1640
- cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose
1741
- cat ./coverage/coverage.json | node_modules/codecov.io/bin/codecov.io.js

appveyor.yml

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,20 @@
11
# appveyor file
22
# http://www.appveyor.com/docs/appveyor-yml
33

4+
branches:
5+
only:
6+
- master
7+
48
init:
59
- git config --global core.autocrlf input
610

711
# what combinations to test
812
environment:
913
matrix:
10-
- nodejs_version: "7"
11-
- nodejs_version: "6"
14+
- nodejs_version: 7
15+
job_part: test
16+
- nodejs_version: 6
17+
job_part: test
1218

1319
install:
1420
- ps: Install-Product node $env:nodejs_version x64
@@ -18,7 +24,10 @@ install:
1824

1925
build: off
2026

27+
matrix:
28+
fast_finish: true
29+
2130
test_script:
2231
- node --version
2332
- npm --version
24-
- cmd: npm test
33+
- cmd: npm run appveyor:%job_part%

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,15 @@
3838
"file-loader": "~0.8.0",
3939
"glob": "^5.0.14",
4040
"i18n-webpack-plugin": "~0.2.0",
41-
"istanbul": "^0.3.13",
41+
"istanbul": "^0.4.5",
4242
"jade": "^1.11.0",
4343
"jade-loader": "~0.7.0",
4444
"js-beautify": "^1.5.10",
4545
"json-loader": "~0.5.1",
4646
"less": "^2.5.1",
4747
"less-loader": "^2.0.0",
48-
"mocha": "~2.2.0",
49-
"mocha-lcov-reporter": "0.0.2",
48+
"mocha": "^3.2.0",
49+
"mocha-lcov-reporter": "^1.0.0",
5050
"raw-loader": "~0.5.0",
5151
"script-loader": "~0.6.0",
5252
"should": "^7.0.2",
@@ -78,12 +78,15 @@
7878
"scripts": {
7979
"pretest": "npm run lint && npm run beautify-lint",
8080
"test": "mocha",
81-
"travis": "npm run cover -- --report lcovonly",
81+
"travis:test": "npm run cover:min",
82+
"travis:lint": "npm run lint && npm run beautify-lint",
83+
"appveyor:test": "node --max_old_space_size=4096 node_modules\\mocha\\bin\\mocha --harmony test/*.test.js",
8284
"lint": "eslint lib bin hot scripts",
8385
"beautify-lint": "node ./scripts/beautify-check",
8486
"beautify": "node ./scripts/beautify-rewrite",
8587
"precover": "npm run lint && npm run beautify-lint",
86-
"cover": "istanbul cover -x **/*.runtime.js node_modules/mocha/bin/_mocha",
88+
"cover": "node ./node_modules/istanbul/lib/cli.js cover -x '**/*.runtime.js' node_modules/mocha/bin/_mocha -- test/*.test.js",
89+
"cover:min": "node ./node_modules/istanbul/lib/cli.js cover -x '**/*.runtime.js' --report lcovonly node_modules/mocha/bin/_mocha -- test/*.test.js",
8790
"publish-patch": "npm run lint && npm run beautify-lint && mocha && npm version patch && git push && git push --tags && npm publish"
8891
}
8992
}

test/mocha.opts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
--full-trace
2+
--reporter dot

0 commit comments

Comments
 (0)