Files
github-actions-magento2/coding-standard
Damien Retzinger a1c6246c78 fix(coding-standard): use exactly phpcs.xml if exists (#243)
Inadvertently, the added period causes the `file` / `files` of phpcs to be ignored. This caused `vendor` to be linted.
2026-05-07 09:15:18 -04:00
..

Magento 2 Coding Standard Action

A Github Action that runs the Magento Coding Standard.

Warning

This action is only compatible with Magento v2.4.4+.

Inputs

See the action.yml

Usage

The caller is responsible for checking out the repository and setting up PHP before calling this action.

name: Coding Standard

on:
  push:
    branches:
    - main
  pull_request:
    branches:
    - main

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.
        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.