mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-08-30 05:00:51 +08:00
Configure PHPCS
Now will use config instead of CLI values for most things. Will also show sniff codes.
This commit is contained in:
parent
9484e73e80
commit
bddb86a4c7
2 changed files with 15 additions and 16 deletions
25
.github/workflows/php.yml
vendored
25
.github/workflows/php.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue