Skip to content

Commit d9d308d

Browse files
ci: small improve (#1669)
1 parent 252ea4f commit d9d308d

File tree

2 files changed

+38
-20
lines changed

2 files changed

+38
-20
lines changed

.travis.yml

+26-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +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

313
cache:
414
directories:
515
- node_modules
16+
- $HOME/.npm
617

7-
jobs:
18+
matrix:
819
fast_finish: true
920
include:
10-
- stage: Lint
11-
env: SCRIPT=lint
12-
node_js: 'stable'
21+
- env: JOB_PART=lint
22+
node_js: 11
1323
- &linux
14-
stage: Test (Linux)
15-
env: SCRIPT=test
16-
node_js: 'stable'
17-
- <<: *linux
24+
env: JOB_PART=test
1825
node_js: 11
1926
- <<: *linux
2027
node_js: 10
@@ -23,9 +30,8 @@ jobs:
2330
- <<: *linux
2431
node_js: 6
2532
- &osx
26-
stage: Test (MacOS)
2733
os: 'osx'
28-
env: SCRIPT=test
34+
env: JOB_PART=test
2935
node_js: 11
3036
- <<: *osx
3137
node_js: 10
@@ -34,15 +40,19 @@ jobs:
3440
- <<: *osx
3541
node_js: 6
3642

37-
install:
43+
before_install:
3844
- npm i -g npm@latest
39-
- npm i
4045

41-
script: npm run $SCRIPT
46+
install:
47+
- npm ci
48+
49+
before_script:
50+
- node --version
51+
- npm --version
52+
53+
script:
54+
- npm run $SCRIPT
4255

4356
after_success:
4457
- npm i codecov
4558
- $(npm bin)/codecov
46-
47-
notifications:
48-
email: false

appveyor.yml

+12-4
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
11
build: 'off'
22

3-
cache:
4-
- node_modules
3+
branches:
4+
only:
5+
- master
6+
- next
57

68
init:
79
- git config --global core.autocrlf input
810

11+
cache:
12+
- node_modules
13+
- '%APPDATA%\npm-cache'
14+
915
environment:
1016
matrix:
1117
- nodejs_version: '11'
@@ -23,10 +29,12 @@ matrix:
2329
install:
2430
- ps: Install-Product node $env:nodejs_version x64
2531
- npm i -g npm@latest
26-
- npm i
32+
- npm ci
2733

2834
before_test:
2935
- cmd: npm i webpack@%webpack_version%
3036

3137
test_script:
32-
- cmd: npm t
38+
- node --version
39+
- npm --version
40+
- cmd: npm test

0 commit comments

Comments
 (0)