Test-only changes should not revert changes in composer.json, .info(.yml) and phpunit.xml
Problem/Motivation
The "test-only changes" phpunit job reverts files that are not test file, to demonstrate improved test coverage.
However, some changes are reverted that cause unintended test faiures, and these actually make the job less useful, or even totally useless. Three examples are:
- A change to .info (in D7) and info.yml (D8+) can add new test files or dependencies (which prove the test coverage). If these files are reverted the test results can be invalid at best, and can give false positives of improved test coverage.
- Reverting a change (or the addition of) phpunit.xml will adversely affect the test-only outcome. It can cause the job to fail, for example https://git.drupalcode.org/project/scheduler/-/jobs/3065893
- Reverting a change to composer.json caused an unwanted test failure when changing the core compatibility or adding new require-dev test dependencies
In all of these cases, maintaining the changes in these files will produce the intended outcome of the 'test-only changes' job.
Proposed resolution
Do not revert composer.json, *.info, *.info.yml and phpunit.xml