Skip to content

GH Actions: Bump phpcsstandards/xmllint-validate from 1.0.1 to 2.0.0 #121

GH Actions: Bump phpcsstandards/xmllint-validate from 1.0.1 to 2.0.0

GH Actions: Bump phpcsstandards/xmllint-validate from 1.0.1 to 2.0.0 #121

Workflow file for this run

name: QA
on:
# Run on all pushes and on all pull requests.
push:
pull_request:
# Allow manually triggering the workflow.
workflow_dispatch:
# Cancels all previous workflow runs for the same branch that have not yet completed.
concurrency:
# The concurrency group contains the workflow name and the branch name.
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
checkcs:
name: 'Basic CS and QA checks'
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Install PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: 'latest'
coverage: none
tools: cs2pr
# Validate the composer.json file.
# @link https://getcomposer.org/doc/03-cli.md#validate
- name: Validate Composer installation
run: composer validate --no-check-all --strict
# Install dependencies and handle caching in one go.
# @link https://github.com/marketplace/actions/install-php-dependencies-with-composer
- name: Install Composer dependencies
uses: "ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda" # 4.0.0
with:
# Bust the cache at least once a month - output format: YYYY-MM.
custom-cache-suffix: $(date -u "+%Y-%m")
- name: Validate Project PHPCS ruleset against schema
uses: phpcsstandards/xmllint-validate@5189514594c8d5f4cf21b7e5af50f54d697973d7 # v2.0.0
with:
pattern: "phpcs.xml.dist"
xsd-file: "vendor/squizlabs/php_codesniffer/phpcs.xsd"
# Check the code-style consistency of the PHP files.
- name: Check PHP code style
id: phpcs
run: composer checkcs -- --report-full --report-checkstyle=./phpcs-report.xml
- name: Show PHPCS results in PR
if: ${{ always() && steps.phpcs.outcome == 'failure' }}
run: cs2pr ./phpcs-report.xml
phpstan:
uses: PHPCSStandards/.github/.github/workflows/reusable-phpstan.yml@8ab4abdb86d0a69a15ea85472ab7dd5c44a37759 # v1.2.0
yamllint:
name: 'Lint Yaml'
uses: PHPCSStandards/.github/.github/workflows/reusable-yamllint.yml@8ab4abdb86d0a69a15ea85472ab7dd5c44a37759 # v1.2.0
with:
strict: true