fair-plugin/.github/workflows/coding-standards.yml
Ryan McCue 9ce4b13d15
Add installer for FAIR protocol (#71)
Signed-off-by: Ryan McCue <me@ryanmccue.info>
Signed-off-by: Andy Fragen <andy@thefragens.com>
Signed-off-by: costdev <79332690+costdev@users.noreply.github.com>
Signed-off-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
Signed-off-by: Joe Dolson <design@joedolson.com>
Co-authored-by: Andy Fragen <andy@thefragens.com>
Co-authored-by: costdev <79332690+costdev@users.noreply.github.com>
Co-authored-by: Joe Dolson <design@joedolson.com>
2025-07-27 09:37:50 -07:00

63 lines
1.9 KiB
YAML

name: PHP coding standards
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
# Cancels all previous workflow runs for pull requests that have not completed.
concurrency:
# The concurrency group contains the workflow name and the branch name for pull requests
# or the commit hash for any other events.
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
cancel-in-progress: true
# Disable permissions for all available scopes by default.
# Any needed permissions should be configured at the job level.
permissions: {}
jobs:
# Runs the PHP coding standards checks.
#
# Violations are reported inline with annotations.
#
# Performs the following steps:
# - Checks out the repository.
# - Sets up PHP.
# - Installs Composer dependencies.
# - Make Composer packages available globally.
# - Runs PHPCS on the full codebase (warnings excluded).
# - Ensures version-controlled files are not modified or deleted.
phpcs:
name: Run coding standards checks
runs-on: ubuntu-latest
permissions:
contents: read
timeout-minutes: 20
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
- name: Set up PHP
uses: shivammathur/setup-php@cf4cade2721270509d5b1c766ab3549210a39a2a # v2.33.0
with:
coverage: none
- name: Install Composer dependencies
uses: ramsey/composer-install@3cf229dc2919194e9e36783941438d17239e8520 # v3.1.1
- name: Make Composer packages available globally
run: echo "${PWD}/vendor/bin" >> $GITHUB_PATH
- name: Run PHPCS on all files
id: phpcs-files
run: phpcs . -n --report-full
- name: Ensure version-controlled files are not modified during the checks
run: git diff --exit-code