Skip to content

Commit 2a84dd4

Browse files
ci: improve (#372)
1 parent 81c2c5d commit 2a84dd4

File tree

2 files changed

+43
-11
lines changed

2 files changed

+43
-11
lines changed

.travis.yml

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
1+
sudo: false
2+
3+
git:
4+
depth: 10
5+
6+
branches:
7+
only:
8+
- master
9+
- next
10+
111
language: node_js
212

3-
jobs:
13+
cache:
14+
directories:
15+
- node_modules
16+
- $HOME/.npm
17+
18+
matrix:
419
fast_finish: true
520
include:
6-
- stage: Lint
7-
env: SCRIPT=lint
21+
- env: JOB_PART=lint
822
node_js: 6
923
- &test
10-
stage: Test
11-
env: SCRIPT=test
24+
env: JOB_PART=test
1225
node_js: 6
1326
- <<: *test
1427
node_js: 8
@@ -17,11 +30,19 @@ jobs:
1730
- <<: *test
1831
node_js: 11
1932

20-
script: npm run $SCRIPT
33+
before_install:
34+
- npm i -g npm@latest
35+
36+
install:
37+
- npm ci
38+
39+
before_script:
40+
- node --version
41+
- npm --version
42+
43+
script:
44+
- npm run $JOB_PART
2145

2246
after_success:
2347
- npm i codecov
2448
- $(npm bin)/codecov
25-
26-
notifications:
27-
email: false

appveyor.yml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,17 @@
11
build: 'off'
22

3+
branches:
4+
only:
5+
- master
6+
- next
7+
38
init:
49
- git config --global core.autocrlf input
510

11+
cache:
12+
- node_modules
13+
- '%APPDATA%\npm-cache'
14+
615
environment:
716
matrix:
817
- nodejs_version: '11'
@@ -20,10 +29,12 @@ matrix:
2029
install:
2130
- ps: Install-Product node $env:nodejs_version x64
2231
- npm i -g npm@latest
23-
- npm install
32+
- npm ci
2433

2534
before_test:
2635
- cmd: npm i webpack@%webpack_version%
2736

2837
test_script:
29-
- cmd: npm t
38+
- node --version
39+
- npm --version
40+
- cmd: npm test

0 commit comments

Comments
 (0)