oojs-ui-npm-run-jenkins-node-6-docker takes ~ 20 minutes and often times out at 30 minutes.
T155483 consolidated the CI jobs to save up Nodepool instances and to consolidate the test/demos/doc jobs that essentially did the same. Notably npm install / svgDists.
The job invokes npm run-script jenkins which breaks down to:
- npm test
- grunt test
- jsduck
- npm run postdoc
- grunt copy:jsduck
The Gruntfile.js has a lot of tasks and can certainly be optimized.
Notably:
Karma runs Chromium/Firefox tests serially. Probably we could run them in parallel. Some seems to time out reaching the browsers but that might be unrelated.
image:distSvgs takes 3 minutes, image:distPngs ~ 90 seconds. I don't think thoses are strictly needed to run tests.
exec:composer we added it to the npm job to save a Nodepool instance ( https://gerrit.wikimedia.org/r/#/c/345284/ ). That is now a duplicate of the other Jenkins jobs that run composer test on php5/php7/hhvm.
I have created a dummy Gerrit change that adds grunt-timer. The module reports the duration of each grunt task. Filtering out anything that took less than 10 seconds:
Task | Duration, 2018-03 | Duration, 2019-05 |
---|---|---|
svg2png:dist | 1 minute 0 second | 48 seconds |
karma:main (Chromium) | 1 minute 52 seconds | 2 minutes 15 seconds |
karma:other (Firefox) | 4 minutes 1 second | (skipped except on merge) * |
image:distSvgs | 3 minutes 49 seconds | 3 seconds (now svgmin:distSvgs) * |
image:distPngs | 2 minutes 3 seconds | 35 seconds (now imagemin:distPngs) * |
Total | 13 minutes 45 seconds | 4 minutes 58 seconds |
- == now only runs on CI