Skip to content

Commit 67717ab

Browse files
authored
Merge pull request webpack#7383 from webpack/ci/improvements
speed up CI
2 parents 962cea5 + 72a45ab commit 67717ab

File tree

3 files changed

+33
-53
lines changed

3 files changed

+33
-53
lines changed

.travis.yml

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -26,45 +26,27 @@ matrix:
2626
stage: basic
2727
- os: linux
2828
node_js: "10"
29-
env: NO_WATCH_TESTS=1 JOB_PART=lint
29+
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=lint-unit
3030
stage: advanced
3131
- os: linux
3232
node_js: "10"
33-
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration1
33+
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
3434
stage: advanced
35-
- os: linux
36-
node_js: "10"
37-
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration2
38-
stage: advanced
39-
- os: linux
40-
node_js: "10"
41-
env: NO_WATCH_TESTS=1 JOB_PART=unit
42-
stage: advanced
43-
- os: osx
44-
node_js: "10"
45-
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration1
46-
stage: versions
4735
- os: osx
4836
node_js: "10"
49-
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration2
50-
stage: versions
51-
- os: linux
52-
node_js: "8"
53-
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration1
37+
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
5438
stage: versions
5539
- os: linux
5640
node_js: "8"
57-
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration2
41+
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
5842
stage: versions
5943
- os: linux
6044
node_js: "6"
61-
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration1
62-
stage: versions
63-
- os: linux
64-
node_js: "6"
65-
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration2
45+
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
6646
stage: versions
6747
fast_finish: true
48+
allow_failures:
49+
- os: osx
6850

6951
install:
7052
- yarn --frozen-lockfile
@@ -76,7 +58,7 @@ script: yarn travis:$JOB_PART
7658
after_success:
7759
- cat ./coverage/lcov.info | node_modules/.bin/coveralls --verbose
7860
- bash <(curl -s https://codecov.io/bash) -F $JOB_PART -X gcov
79-
- rm -rf ./coverage
61+
- rm -f .jest-cache/haste-map* .jest-cache/perf-cache*
8062

8163
notifications:
8264
slack:

appveyor.yml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,28 @@ branches:
99
init:
1010
- git config --global core.autocrlf input
1111

12+
cache:
13+
- "..\\.yarn-cache"
14+
- ".jest-cache"
15+
1216
# what combinations to test
1317
environment:
1418
matrix:
15-
- nodejs_version: 8
19+
- nodejs_version: 10
1620
job_part: unit
17-
- nodejs_version: 8
18-
job_part: integration1
19-
jest: --maxWorkers=2
20-
- nodejs_version: 8
21-
job_part: integration2
22-
jest: --maxWorkers=2
23-
- nodejs_version: 6
24-
job_part: integration1
25-
jest: --maxWorkers=2
21+
jest: --maxWorkers=2 --cacheDirectory .jest-cache
22+
- nodejs_version: 10
23+
job_part: integration
24+
jest: --maxWorkers=2 --cacheDirectory .jest-cache
2625
- nodejs_version: 6
27-
job_part: integration2
28-
jest: --maxWorkers=2
26+
job_part: integration
27+
jest: --maxWorkers=2 --cacheDirectory .jest-cache
2928

3029
install:
3130
- ps: Install-Product node $env:nodejs_version x64
32-
- npm install yarn -g
33-
- yarn install --frozen-lockfile
34-
- yarn link --frozen-lockfile || yarn link --frozen-lockfile
35-
- yarn link webpack --frozen-lockfile
31+
- yarn --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache
32+
- yarn link --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache || yarn link --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache
33+
- yarn link webpack --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache
3634

3735
build: off
3836

@@ -44,5 +42,7 @@ test_script:
4442
- yarn --version
4543
- cmd: set JEST=%jest%
4644
- cmd: yarn appveyor:%job_part%
45+
- cmd: yarn istanbul report --report lcovonly
4746
- cmd: yarn unlink webpack
4847
- cmd: yarn global add codecov && codecov -F %job_part% --disable=gcov
48+
- cmd: del /F /Q .jest-cache\\haste-map* .jest-cache\\perf-cache* 2> null || Ver > null

package.json

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,12 @@
102102
"test:integration": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\"",
103103
"test:basic": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/{TestCasesNormal,StatsTestCases,ConfigTestCases}.test.js\"",
104104
"test:unit": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\"",
105-
"travis:integration1": "yarn cover:init && yarn cover:integration \"test/((?!TestCases)|TestCasesD)\" --ci $JEST && yarn cover:report-min",
106-
"travis:integration2": "yarn cover:init && yarn cover:integration \"test/TestCases(?!D)\" --ci $JEST && yarn cover:report-min",
105+
"travis:integration": "yarn cover:init && yarn cover:integration \"test/((?!TestCases)|TestCasesD)\" --ci $JEST && mv coverage/coverage-final.json coverage/coverage-final-1.json && yarn cover:integration \"test/TestCases(?!D)\" --ci $JEST && mv coverage/coverage-final.json coverage/coverage-final-2.json",
107106
"travis:basic": "yarn test:basic --ci $JEST",
108-
"travis:unit": "yarn cover:init && yarn cover:unit --ci",
109-
"travis:lint": "yarn lint",
107+
"travis:lint-unit": "yarn lint && yarn cover:init && yarn cover:unit --ci $JEST",
110108
"travis:benchmark": "yarn benchmark --ci",
111-
"appveyor:integration1": "yarn cover:init && yarn cover:integration \"test/((?!TestCases)|TestCasesD)\" --ci %JEST% && yarn cover:report-min",
112-
"appveyor:integration2": "yarn cover:init && yarn cover:integration \"test/TestCases(?!D)\" --ci %JEST% && yarn cover:report-min",
113-
"appveyor:unit": "yarn cover:init && yarn cover:unit --ci && yarn cover:report-min",
109+
"appveyor:integration": "yarn cover:init && yarn cover:integration \"test/((?!TestCases)|TestCasesD)\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-1.json && yarn cover:integration \"test/TestCases(?!D)\" --ci %JEST% && move coverage\\coverage-final.json coverage\\coverage-final-2.json",
110+
"appveyor:unit": "yarn cover:init && yarn cover:unit --ci %JEST%",
114111
"appveyor:benchmark": "yarn benchmark --ci",
115112
"circleci:test": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --ci",
116113
"circleci:lint": "yarn lint",
@@ -129,8 +126,7 @@
129126
"cover:all": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --coverage",
130127
"cover:integration": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\" --coverage",
131128
"cover:unit": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\" --coverage",
132-
"cover:report": "istanbul report",
133-
"cover:report-min": "istanbul report --report lcovonly"
129+
"cover:report": "istanbul report"
134130
},
135131
"jest": {
136132
"forceExit": true,
@@ -147,7 +143,8 @@
147143
"<rootDir>/test/fixtures/temp-",
148144
"<rootDir>/benchmark/",
149145
"<rootDir>/examples/*/dist",
150-
"<rootDir>/coverage/"
146+
"<rootDir>/coverage/",
147+
"<rootDir>/.eslintcache/"
151148
],
152149
"modulePathIgnorePatterns": [
153150
"<rootDir>/node_modules/webpack/node_modules/",
@@ -157,7 +154,8 @@
157154
"<rootDir>/test/fixtures/temp-",
158155
"<rootDir>/benchmark/",
159156
"<rootDir>/examples/*/dist",
160-
"<rootDir>/coverage/"
157+
"<rootDir>/coverage/",
158+
"<rootDir>/.eslintcache/"
161159
],
162160
"transformIgnorePatterns": [
163161
"<rootDir>/"

0 commit comments

Comments
 (0)