mirror of
https://gh.wpcy.net/https://github.com/elementor/one-click-accessibility.git
synced 2026-04-21 02:26:10 +08:00
* updated github actions * removed composer github auth * PHPCS * removed package-lock.json from ignore to allow `npm ci` * added missing husky * ignore legacy * removed unused non existing import
52 lines
1.2 KiB
YAML
52 lines
1.2 KiB
YAML
name: PHP Lint
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
cancel-in-progress: true
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
PHP-Code-Standards:
|
|
name: Lint PHP files
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, '[skip PHPCS]') || !contains(github.event.head_commit.message, '[skip CI]')"
|
|
steps:
|
|
- name: Check out source code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '7.4'
|
|
coverage: none
|
|
tools: composer, cs2pr, phpcs
|
|
env:
|
|
fail-fast: 'true'
|
|
|
|
- name: Log debug information
|
|
run: |
|
|
export PATH=$HOME/.composer/vendor/bin:$PATH
|
|
php --version
|
|
phpcs -i
|
|
composer --version
|
|
|
|
- name: Install dependencies
|
|
uses: ramsey/composer-install@v3
|
|
|
|
- name: Add error matcher
|
|
run: echo "::add-matcher::$(pwd)/.github/checkstyle-problem-matcher.json"
|
|
|
|
- name: Run style check
|
|
run: |
|
|
export PATH=$HOME/.composer/vendor/bin:$PATH
|
|
composer run lint -- --report=checkstyle
|
|
|