mirror of
https://github.com/graycoreio/github-actions-magento2.git
synced 2026-06-08 19:46:41 +00:00
feat(coding-standard)!: remove pr-diff feature and built-in php setup (#224)
BREAKING CHANGE: Much of the "setup" that's built-into the command is removed in favor of a leaner action. This also includes the "on PR, only diff PR contents" behavior. This can be restored, but it shouldn't be the default and should be done as an input. Fix SEVERITY_FLAGS construction which exited 1 under bash -e when severity inputs were empty, causing CI failures.
This commit is contained in:
@@ -11,6 +11,8 @@ See the [action.yml](./action.yml)
|
||||
|
||||
## Usage
|
||||
|
||||
The caller is responsible for checking out the repository and setting up PHP before calling this action.
|
||||
|
||||
```yml
|
||||
name: Coding Standard
|
||||
|
||||
@@ -26,11 +28,19 @@ jobs:
|
||||
coding-standard:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: '8.3'
|
||||
tools: composer:v2
|
||||
coverage: none
|
||||
|
||||
- uses: graycoreio/github-actions-magento2/coding-standard@main
|
||||
with:
|
||||
path: app/code # Optional, defaults to .
|
||||
version: 25 # Optional, will use the latest if omitted.
|
||||
path: app/code # Optional, will be used when event is not a pull request.
|
||||
severity: 8 # Optional, will use phpcs default of 5 if not specified.
|
||||
warning_severity: 4 # Optional, will use severity value if not specified.
|
||||
error_severity: 7 # Optional, will use severity value if not specified.
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user