Skip to content

Commit

Permalink
Merge pull request #7383 from webpack/ci/improvements
Browse files Browse the repository at this point in the history
speed up CI
  • Loading branch information
sokra committed May 24, 2018
2 parents 962cea5 + 72a45ab commit 67717ab
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 53 deletions.
34 changes: 8 additions & 26 deletions .travis.yml
Expand Up @@ -26,45 +26,27 @@ matrix:
stage: basic
- os: linux
node_js: "10"
env: NO_WATCH_TESTS=1 JOB_PART=lint
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=lint-unit
stage: advanced
- os: linux
node_js: "10"
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration1
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
stage: advanced
- os: linux
node_js: "10"
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration2
stage: advanced
- os: linux
node_js: "10"
env: NO_WATCH_TESTS=1 JOB_PART=unit
stage: advanced
- os: osx
node_js: "10"
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration1
stage: versions
- os: osx
node_js: "10"
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration2
stage: versions
- os: linux
node_js: "8"
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration1
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
stage: versions
- os: linux
node_js: "8"
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration2
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
stage: versions
- os: linux
node_js: "6"
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration1
stage: versions
- os: linux
node_js: "6"
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration2
env: NO_WATCH_TESTS=1 JEST="--maxWorkers=2 --cacheDirectory .jest-cache" JOB_PART=integration
stage: versions
fast_finish: true
allow_failures:
- os: osx

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

notifications:
slack:
Expand Down
32 changes: 16 additions & 16 deletions appveyor.yml
Expand Up @@ -9,30 +9,28 @@ branches:
init:
- git config --global core.autocrlf input

cache:
- "..\\.yarn-cache"
- ".jest-cache"

# what combinations to test
environment:
matrix:
- nodejs_version: 8
- nodejs_version: 10
job_part: unit
- nodejs_version: 8
job_part: integration1
jest: --maxWorkers=2
- nodejs_version: 8
job_part: integration2
jest: --maxWorkers=2
- nodejs_version: 6
job_part: integration1
jest: --maxWorkers=2
jest: --maxWorkers=2 --cacheDirectory .jest-cache
- nodejs_version: 10
job_part: integration
jest: --maxWorkers=2 --cacheDirectory .jest-cache
- nodejs_version: 6
job_part: integration2
jest: --maxWorkers=2
job_part: integration
jest: --maxWorkers=2 --cacheDirectory .jest-cache

install:
- ps: Install-Product node $env:nodejs_version x64
- npm install yarn -g
- yarn install --frozen-lockfile
- yarn link --frozen-lockfile || yarn link --frozen-lockfile
- yarn link webpack --frozen-lockfile
- yarn --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache
- yarn link --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache || yarn link --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache
- yarn link webpack --frozen-lockfile --preferred-cache-folder ..\\.yarn-cache

build: off

Expand All @@ -44,5 +42,7 @@ test_script:
- yarn --version
- cmd: set JEST=%jest%
- cmd: yarn appveyor:%job_part%
- cmd: yarn istanbul report --report lcovonly
- cmd: yarn unlink webpack
- cmd: yarn global add codecov && codecov -F %job_part% --disable=gcov
- cmd: del /F /Q .jest-cache\\haste-map* .jest-cache\\perf-cache* 2> null || Ver > null
20 changes: 9 additions & 11 deletions package.json
Expand Up @@ -102,15 +102,12 @@
"test:integration": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\"",
"test:basic": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/{TestCasesNormal,StatsTestCases,ConfigTestCases}.test.js\"",
"test:unit": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\"",
"travis:integration1": "yarn cover:init && yarn cover:integration \"test/((?!TestCases)|TestCasesD)\" --ci $JEST && yarn cover:report-min",
"travis:integration2": "yarn cover:init && yarn cover:integration \"test/TestCases(?!D)\" --ci $JEST && yarn cover:report-min",
"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",
"travis:basic": "yarn test:basic --ci $JEST",
"travis:unit": "yarn cover:init && yarn cover:unit --ci",
"travis:lint": "yarn lint",
"travis:lint-unit": "yarn lint && yarn cover:init && yarn cover:unit --ci $JEST",
"travis:benchmark": "yarn benchmark --ci",
"appveyor:integration1": "yarn cover:init && yarn cover:integration \"test/((?!TestCases)|TestCasesD)\" --ci %JEST% && yarn cover:report-min",
"appveyor:integration2": "yarn cover:init && yarn cover:integration \"test/TestCases(?!D)\" --ci %JEST% && yarn cover:report-min",
"appveyor:unit": "yarn cover:init && yarn cover:unit --ci && yarn cover:report-min",
"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",
"appveyor:unit": "yarn cover:init && yarn cover:unit --ci %JEST%",
"appveyor:benchmark": "yarn benchmark --ci",
"circleci:test": "node --max-old-space-size=4096 --trace-deprecation node_modules/jest-cli/bin/jest --ci",
"circleci:lint": "yarn lint",
Expand All @@ -129,8 +126,7 @@
"cover:all": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --coverage",
"cover:integration": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.test.js\" --coverage",
"cover:unit": "node --max-old-space-size=4096 node_modules/jest-cli/bin/jest --testMatch \"<rootDir>/test/*.unittest.js\" --coverage",
"cover:report": "istanbul report",
"cover:report-min": "istanbul report --report lcovonly"
"cover:report": "istanbul report"
},
"jest": {
"forceExit": true,
Expand All @@ -147,7 +143,8 @@
"<rootDir>/test/fixtures/temp-",
"<rootDir>/benchmark/",
"<rootDir>/examples/*/dist",
"<rootDir>/coverage/"
"<rootDir>/coverage/",
"<rootDir>/.eslintcache/"
],
"modulePathIgnorePatterns": [
"<rootDir>/node_modules/webpack/node_modules/",
Expand All @@ -157,7 +154,8 @@
"<rootDir>/test/fixtures/temp-",
"<rootDir>/benchmark/",
"<rootDir>/examples/*/dist",
"<rootDir>/coverage/"
"<rootDir>/coverage/",
"<rootDir>/.eslintcache/"
],
"transformIgnorePatterns": [
"<rootDir>/"
Expand Down

0 comments on commit 67717ab

Please sign in to comment.