Files
github-actions-magento2/.github/workflows/_internal-coding-standard.yaml
T
Damien Retzinger d5c744e155 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.
2026-04-26 22:51:44 -04:00

64 lines
1.6 KiB
YAML

name: Coding Standard
on:
push:
branches:
- main
paths:
- "_test/demo-package/**"
- ".github/workflows/_internal-coding-standard.yaml"
- "coding-standard/**"
- "!(**/*.md)"
pull_request:
branches:
- main
paths:
- "_test/demo-package/**"
- ".github/workflows/_internal-coding-standard.yaml"
- "coding-standard/**"
- "!(**/*.md)"
workflow_dispatch:
inputs:
version:
type: string
default: '*'
description: The version of the coding standard to use.
required: false
path:
type: string
default: '_test/demo-package'
description: Path to run the coding standard on.
required: true
jobs:
compute_matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.supported-version.outputs.matrix }}
steps:
- uses: actions/checkout@v6
- uses: ./supported-version
with:
kind: currently-supported
id: supported-version
- run: echo ${{ steps.supported-version.outputs.matrix }}
coding-standard:
needs: compute_matrix
strategy:
matrix: ${{ fromJSON(needs.compute_matrix.outputs.matrix) }}
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v${{ matrix.composer }}
coverage: none
- uses: './coding-standard'
with:
version: ${{ github.event.inputs.version || '*' }}
path: ${{ github.event.inputs.path || '_test/demo-package' }}