Review main Abandoned

88239[TASK] Improve performance of runTests lint and build tasks

Ayke Halder CR 0 V 0 Easy +24 −8 updated 02/17/25, 13:22

Commit message

In `runTests` lint and build tasks the command `npm ci` (clean install)
is only run once or in case `package-lock.json` modify timestamp has
changed.

Before `npm ci` was triggered on each task run.

`npm ci` cleares the `node_modules` folder and then all node-modules
are newly installed.
Running `npm ci` takes 15-20 sec itself. Additionally recreating the
`node_modules` folder triggers IDE indexing actions for ~45.000 files
which takes a lot of time.

The reason for using `npm ci` in the first place is that all packages
are installed with the exact versions locked in `package-lock.json`.
Where-as `npm install` might do minor-version updates of packages.

This change is not about improving the performance of CI:
For CI runners a special cache configuration in combination with
`npm ci --cache .npm --prefer-offline` might be used.
See https://docs.gitlab.com/ee/ci/caching/#cache-nodejs-dependencies

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 2

Review log 35

  1. Ayke Halder uploaded patch set 1 02/16/25, 20:24

  2. core-ci voted on patch set 1 V +1 02/16/25, 20:30 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74213

  3. Ayke Halder uploaded patch set 2 V +1 02/16/25, 20:59

  4. core-ci voted on patch set 2 V +1 02/16/25, 21:05 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/74214

  5. Ayke Halder abandoned the change 02/17/25, 13:22

    Use `runTests.sh -s npm -- run watch:build` and directly commit the result.