Skip to content

Commit 42592df

Browse files
committed
ci: Setup to test webpack 4.x
1 parent 9743a68 commit 42592df

File tree

1 file changed

+34
-19
lines changed

1 file changed

+34
-19
lines changed

.travis.yml

Lines changed: 34 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,47 @@
11
sudo: false
2+
dist: trusty
23
language: node_js
34
branches:
45
only:
56
- master
6-
matrix:
7+
jobs:
78
fast_finish: true
9+
allow_failures:
10+
- env: WEBPACK_VERSION=canary
811
include:
9-
- os: linux
10-
node_js: "7"
11-
env: WEBPACK_VERSION="2.2.0" JOB_PART=lint
12-
- os: linux
13-
node_js: "6"
14-
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
15-
- os: linux
16-
node_js: "4.3"
17-
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
18-
- os: linux
19-
node_js: "7"
20-
env: WEBPACK_VERSION="2.2.0" JOB_PART=test
21-
- os: linux
22-
node_js: "4.3"
23-
env: WEBPACK_VERSION="1.14.0" JOB_PART=test
12+
- &test-latest
13+
stage: Webpack latest
14+
node_js: 6
15+
env: WEBPACK_VERSION=latest JOB_PART=test
16+
script: npm run travis:$JOB_PART
17+
- <<: *test-latest
18+
node_js: 4.8
19+
env: WEBPACK_VERSION=latest JOB_PART=test
20+
script: npm run travis:$JOB_PART
21+
- <<: *test-latest
22+
node_js: 8
23+
env: WEBPACK_VERSION=latest JOB_PART=lint
24+
script: npm run travis:$JOB_PART
25+
- <<: *test-latest
26+
node_js: 8
27+
env: WEBPACK_VERSION=latest JOB_PART=coverage
28+
script: npm run travis:$JOB_PART
29+
after_success: 'bash <(curl -s https://codecov.io/bash)'
30+
- stage: Webpack canary
31+
node_js: 8
32+
env: WEBPACK_VERSION=4.0.0-alpha.0 JOB_PART=test
33+
script: npm run travis:$JOB_PART
2434
before_install:
35+
- 'if [[ `npm -v` != 5* ]]; then npm i -g npm@^5.0.0; fi'
2536
- nvm --version
2637
- node --version
38+
- npm --version
2739
before_script:
28-
- 'if [ "$WEBPACK_VERSION" ]; then yarn add webpack@^$WEBPACK_VERSION; fi'
40+
- |-
41+
if [ "$WEBPACK_VERSION" ]; then
42+
npm i --no-save webpack@$WEBPACK_VERSION
43+
fi
2944
script:
30-
- yarn run travis:$JOB_PART
45+
- 'npm run travis:$JOB_PART'
3146
after_success:
32-
- bash <(curl -s https://codecov.io/bash)
47+
- 'bash <(curl -s https://codecov.io/bash)'

0 commit comments

Comments
 (0)