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 [[ https://gerrit.wikimedia.org/r/#/c/416862/ | 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 | 20 seconds |
| karma:main (Chromium) | 1 minute 52 seconds | 1 minute 49 seconds |
| karma:other (Firefox) | 4 minutes 1 second | 1 minute 35 seconds (only run on CI) |
| image:distSvgs' | 3 minutes 49 seconds | 1 second (now only run on merge) |
| image:distPngs | 2 minutes 3 seconds | 11 seconds (now only run on merge) |
| Total | 13 minutes 45 seconds | 2 minutes 59 seconds |