Project

General

Profile

Actions

Bug #95216

closed

runTests.sh behaves different than the package.json "script" commands

Added by Jonas Eberle about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
Tests
Target version:
-
Start date:
2021-09-14
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

In the contribution workflow we promote using `yarn build-...` which is a shorthand for using the defined commands in package.json "script" section (https://github.com/TYPO3/typo3/blob/master/Build/package.json#L72-L80).

runTests.sh provides the commands `buildJavascript`/`buildCss`, too.

In the case of `buildJavascript` this produces slightly differently minified output to `yarn build-js` (for example a `;` somewhere instead of a `,`).

The called commands are:

./node_modules/.bin/grunt scripts        # cd Build && yarn install && yarn build-js
./node_modules/grunt/bin/grunt scripts   # Build/Scripts/runTests.sh -s buildJavascript

I'd propose to use the commands from the package.json via yarn in runTests.sh, too.

I would also take the opportunity to coerce them into one command/"suite" with arguments, too if technically possible. (E.g. `Build/Scripts/runTests.sh -s yarn build-css`). That should make it less complex to understand where they come from and what they do.

It appears that the `Build/Scripts/runTests.sh -s build*` commands are currently not part of the CI https://github.com/TYPO3/typo3/tree/master/Build/gitlab-ci - I would suggest to add them to check for correct builds.

Ref:
https://docs.typo3.org/m/typo3/guide-contributionworkflow/master/en-us/Setup/SetupTypo3.html#yarn-tasks

Actions

Also available in: Atom PDF