-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Split static analysis workflow #51
Conversation
To be tagged as 5.2.0 |
2940366
to
6571c9b
Compare
Note that I removed the workflow template so that this workflow no longer gets suggested when setting up new workflows through the github UI |
.github/workflows/phpstan.yml
Outdated
strategy: | ||
matrix: | ||
php-version: | ||
- "${{ inputs.php-version }}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we even using a matrix here, with a single value in the matrix ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IIRC it is to make the PHP version appear in the label of the job.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can use name: "PHPStan (php: ${{ inputs.php-version }})"
to make that in a simpler way AFAIK (and with an explicit intent)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll try that!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- name: "Run a static analysis with phpstan/phpstan" | ||
run: "vendor/bin/phpstan analyse -v" | ||
name: "PHPStan (deprecated in favor of phpstan.yml)" | ||
uses: "./.github/workflows/phpstan.yml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
shouldn't this forward the inputs instead of using the defaults of the phpstan.yml workflow ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh right, good catch!
6571c9b
to
ae081ea
Compare
This should allow downstream projects to better prepare for the Psalm removal: they can use the new phpstan workflow whenever they want to drop Psalm, and when all of them do, then we can drop the static analysis workflow form this repository.
ae081ea
to
c5b75c1
Compare
This should allow downstream projects to better prepare for the Psalm removal: they can use the new phpstan workflow whenever they want to drop Psalm, and when all of them do, then we can drop the static analysis workflow form this repository.
Proof that it does not break the old workflow: greg0ire/collections#2
Proof that the new workflow works: greg0ire/collections#3