Skip to content

ci(quality): migrate the PHP lint job to reusable-php-lint #18

ci(quality): migrate the PHP lint job to reusable-php-lint

ci(quality): migrate the PHP lint job to reusable-php-lint #18

Workflow file for this run

name: Quality
on:
push:
branches: [trunk]
pull_request:
permissions:
contents: read
jobs:
lint-php:
name: PHP Lint (${{ matrix.plugin }})
strategy:
fail-fast: false
matrix:
plugin:
- internal-comments
- linked-orders-for-woocommerce
- locked-payment-methods-for-woocommerce
uses: ahegyes/wordpress-configs/.github/workflows/reusable-php-lint.yml@0a9f3152853200fbdcbe3fa8d5073aae24fb05c3
with:
php-version: '8.5'
project-path: plugins/${{ matrix.plugin }}
scripts: '["lint:php:phpcs", "lint:php:phpstan"]'
changelog:
name: Changelog fragments (${{ matrix.scope }})
strategy:
fail-fast: false
matrix:
scope:
- root
- internal-comments
- linked-orders-for-woocommerce
- locked-payment-methods-for-woocommerce
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
with:
persist-credentials: false
- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240
with:
php-version: '8.5'
coverage: none
tools: composer:v2
- name: Resolve working directory
id: dir
run: |
if [ "${{ matrix.scope }}" = "root" ]; then
echo "path=." >> "$GITHUB_OUTPUT"
else
echo "path=plugins/${{ matrix.scope }}" >> "$GITHUB_OUTPUT"
fi
- uses: ramsey/composer-install@26d8a556604053a9612623447203a691f406fbe6
with:
working-directory: ${{ steps.dir.outputs.path }}
- run: composer changelog:validate
working-directory: ${{ steps.dir.outputs.path }}
readme-lint:
name: readme.txt lint (${{ matrix.plugin }})
strategy:
fail-fast: false
matrix:
plugin:
- internal-comments
- linked-orders-for-woocommerce
- locked-payment-methods-for-woocommerce
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10
with:
persist-credentials: false
- uses: thetwopct/wporg-plugin-readme-linter@1f869aba959265ecc90935b2380c6569d56646ac
with:
path: plugins/${{ matrix.plugin }}/readme.txt
fail-on: error