Configure PHPCS

Now will use config instead of CLI values for most things.
Will also show sniff codes.
This commit is contained in:
Anton Ukhanev 2021-02-17 14:25:42 +01:00
parent 9484e73e80
commit bddb86a4c7
2 changed files with 15 additions and 16 deletions

View file

@ -1,27 +1,25 @@
name: PHP Composer
name: CI
on:
push:
branches: [ trunk ]
pull_request:
branches: [ trunk ]
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.1', '7.2', '7.3', '7.4']
name: PHP ${{ matrix.php-versions }}
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
php-version: ${{ matrix.php-versions }}
- name: Packagist.com Auth
run: composer config --global --auth http-basic.repo.packagist.com token ${{ secrets.PACKAGIST_TOKEN }}
- name: Validate composer.json and composer.lock
run: composer validate
@ -31,7 +29,8 @@ jobs:
with:
composer-options: "--prefer-dist"
- name: Run test suite
run: ./vendor/bin/phpunit
- name: Run Woocommerce coding standards
run: ./vendor/bin/phpcs
- name: Run PHPUnit
run: vendor/bin/phpunit
- name: Run PHPCS
run: ./vendor/bin/phpcs--runtime-set ignore_warnings_on_exit 1 src modules woocommerce-paypal-payments.php --extensions=php

View file

@ -25,9 +25,9 @@
</rule>
<arg name="extensions" value="php"/>
<file>./src</file>
<file>./modules</file>
<file>./woocommerce-paypal-payments.php</file>
<file>src</file>
<file>modules</file>
<file>woocommerce-paypal-payments.php</file>
<exclude-pattern>*/node_modules/*</exclude-pattern>
<exclude-pattern>*/vendor/*</exclude-pattern>