-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: Travis build speed improvements #504
Conversation
Test summaryRun details
View run in Cypress Dashboard ➡️ This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
Reduce that cache size and node_modules folder size
"yarn cypress run --record" && | ||
yarn http-server docs -p 9001 & npx wait-on http://localhost:9001 && | ||
yarn run-p -l | ||
"chromatic -- --quiet --exit-zero-on-changes --exit-once-uploaded --storybook-build-dir docs" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the work is done on Chromatic's side so this allows us to make our Chromatic build command exit after we've uploaded the Storybook source. This also ensures that we don't incur CI build time increases in Travis as we add more visual testing stories.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
--exit-once-uploaded
Genius. I didn't matter much when we only had Chrome and it took like 15s for 300 stories. IE11 is much slower. We already have a status check that is reported by Chromatic. We don't need to wait for it here. 👍
"yarn lint" | ||
"yarn depcheck" | ||
"yarn test" | ||
yarn run-p -l |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, concurrently
is about 40mb and npm-run-all/run-p
pretty much do the same thing at a fraction of the size.
@@ -137,6 +135,7 @@ | |||
"create-module": "./utils/create-component/createComponent.js", | |||
"create-component": "./utils/create-component/createComponent.js", | |||
"precommit": "lint-staged", | |||
"chromatic": "chromatic", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need this to run chromatic via run-p
in Travis
@@ -74,7 +73,7 @@ jobs: | |||
script: | |||
- >- # Chromatic relies on a built Storybook, so exit early if build-storybook fails | |||
yarn build-storybook && | |||
yarn chromatic --quiet --auto-accept-changes --storybook-build-dir docs | |||
yarn chromatic --quiet --auto-accept-changes --exit-once-uploaded --storybook-build-dir docs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
webpack@^4.33.0: | ||
version "4.34.0" | ||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.34.0.tgz#a4c30129482f7b4ece4c0842002dedf2b56fab58" | ||
integrity sha512-ry2IQy1wJjOefLe1uJLzn5tG/DdIKzQqNlIAd2L84kcaADqNvQDTBlo8UcCNyDaT5FiaB+16jhAkb63YeG3H8Q== | ||
dependencies: | ||
"@webassemblyjs/ast" "1.8.5" | ||
"@webassemblyjs/helper-module-context" "1.8.5" | ||
"@webassemblyjs/wasm-edit" "1.8.5" | ||
"@webassemblyjs/wasm-parser" "1.8.5" | ||
acorn "^6.0.5" | ||
acorn-dynamic-import "^4.0.0" | ||
ajv "^6.1.0" | ||
ajv-keywords "^3.1.0" | ||
chrome-trace-event "^1.0.0" | ||
enhanced-resolve "^4.1.0" | ||
eslint-scope "^4.0.0" | ||
json-parse-better-errors "^1.0.2" | ||
loader-runner "^2.3.0" | ||
loader-utils "^1.1.0" | ||
memory-fs "~0.4.1" | ||
micromatch "^3.1.8" | ||
mkdirp "~0.5.0" | ||
neo-async "^2.5.0" | ||
node-libs-browser "^2.0.0" | ||
schema-utils "^1.0.0" | ||
tapable "^1.1.0" | ||
terser-webpack-plugin "^1.1.0" | ||
watchpack "^1.5.0" | ||
webpack-sources "^1.3.0" | ||
|
||
webpack@^4.38.0: | ||
version "4.41.2" | ||
resolved "https://registry.yarnpkg.com/webpack/-/webpack-4.41.2.tgz#c34ec76daa3a8468c9b61a50336d8e3303dce74e" | ||
integrity sha512-Zhw69edTGfbz9/8JJoyRQ/pq8FYUoY0diOXqW0T6yhgdhCv6wr0hra5DwwWexNRns2Z2+gsnrNcbe9hbGBgk/A== | ||
dependencies: | ||
"@webassemblyjs/ast" "1.8.5" | ||
"@webassemblyjs/helper-module-context" "1.8.5" | ||
"@webassemblyjs/wasm-edit" "1.8.5" | ||
"@webassemblyjs/wasm-parser" "1.8.5" | ||
acorn "^6.2.1" | ||
ajv "^6.10.2" | ||
ajv-keywords "^3.4.1" | ||
chrome-trace-event "^1.0.2" | ||
enhanced-resolve "^4.1.0" | ||
eslint-scope "^4.0.3" | ||
json-parse-better-errors "^1.0.2" | ||
loader-runner "^2.4.0" | ||
loader-utils "^1.2.3" | ||
memory-fs "^0.4.1" | ||
micromatch "^3.1.10" | ||
mkdirp "^0.5.1" | ||
neo-async "^2.6.1" | ||
node-libs-browser "^2.2.1" | ||
schema-utils "^1.0.0" | ||
tapable "^1.1.3" | ||
terser-webpack-plugin "^1.4.1" | ||
watchpack "^1.6.0" | ||
webpack-sources "^1.4.1" | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice. Less webpacks. It looks like those other webpack versions had the same dependencies, so it wasn't too bad, but nice to get it cleaned up
Things we did to speed up Travis (hopefully for real this time):
concurrently
withrun-p
(part ofnpm-run-all
, a dep we already use). Concurrently was a 40mb hit to our cache and didn't add any value from what we already have.We went from around 20 to 25 min to 15min. Not too shabby.