Skip to content

Improve: Add radio-images field with visual card selector UI #965

Improve: Add radio-images field with visual card selector UI

Improve: Add radio-images field with visual card selector UI #965

Workflow file for this run

name: PHPCS Check
on:
pull_request_target:
paths:
- '**/*.php' # Run only when PHP files change
# Concurrency: Ensure only one instance of this workflow runs per pull request or commit.
# If a new workflow for the same pull request/commit is triggered, the previous one will be canceled.
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: true
jobs:
phpcs:
name: PHPCS Check
runs-on: ubuntu-latest
steps:
# Step 1: Checkout the code from the pull request base branch to ensure we're analyzing the correct changes.
- name: Checkout code
uses: actions/checkout@v3
with:
# checkout the PR branch, not the base
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0 # ensures full history
# Step 2: Set up PHP 7.4 with necessary configurations. Also, install the "cs2pr" tool for converting PHPCS output into annotations.
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
ini-values: 'memory_limit=1G'
coverage: none
tools: cs2pr
# Step 3: Install all required Composer dependencies for the project.
- name: Install Composer dependencies
run: composer install
# Step 4: Run the PHPCS check using the "composer phpcs" command to detect coding standard violations.
- name: Run PHPCS checks
run: composer phpcs