Problem/Motivation
We should output the PHPStan fails in the log as well as the code quality section. Also we can update the baseline and offer it as an artifact.
Proposed resolution
The way contrib runs PHPStan is nice. See https://git.drupalcode.org/project/gitlab_templates/-/blob/1.0.x/include...
Remaining tasks
PHPStan test performance
- On HEAD it takes 1 minute 33 seconds
- With this it takes 1 minute 51 seconds
I think the performance of the PHPStan job varies quite a bit.
Example runs:
- https://git.drupalcode.org/project/drupal/-/jobs/384792 no errors
- https://git.drupalcode.org/project/drupal/-/jobs/384812 with errors
User interface changes
N/a
API changes
N/a
Data model changes
N/a
Release notes snippet
N/a
Issue fork drupal-3403653
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
alexpottComment #5
alexpottComment #6
alexpottComment #7
alexpottUpdated it so we only store a new baseline in the artifacts when there is an error.
Comment #8
longwaveMinor fix needed to avoid wasting CPU when PHPStan is successful.
Comment #9
alexpottGreat point @longwave - fixed
Comment #10
alexpottUpdated links to successful and unsuccessful runs.
Comment #11
smustgrave commentedPerfect timing, when I was reviewing #3386841: Reconcile gitlab lint jobs and commit-code-check.sh I was confused why this php static analysis was failing but not showing anything.
Comment #14
longwaveNot convinced of the value of the junit output, it's not very helpful in the GitLab CI, but still it can't harm anything.
Committed and pushed f5223a3852 to 11.x and 7e9983545d to 10.2.x. Thanks!