Add CS workflows (#30)
This commit is contained in:
parent
4cc9023ff1
commit
c98a4309ac
|
|
@ -0,0 +1,38 @@
|
|||
name: Coding Standards
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
|
||||
jobs:
|
||||
coding-standards:
|
||||
name: Coding Standards
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
PHP_CS_FIXER_VERSION: v2.17.3
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
coverage: none
|
||||
tools: php-cs-fixer:${{ env.PHP_CS_FIXER_VERSION }}
|
||||
|
||||
- name: Restore PHP-CS-Fixer cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: .php_cs.cache
|
||||
key: "php-cs-fixer"
|
||||
restore-keys: "php-cs-fixer"
|
||||
|
||||
- name: Run PHP-CS-Fixer, version ${{ env.PHP_CS_FIXER_VERSION }}
|
||||
run: |
|
||||
php-cs-fixer fix --diff --diff-format=udiff --dry-run --verbose
|
||||
|
|
@ -10,6 +10,7 @@ php:
|
|||
cache:
|
||||
directories:
|
||||
- $HOME/.composer/cache
|
||||
- $HOME/.cache/cache
|
||||
- build/cache
|
||||
|
||||
install:
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
"pear/pear-core-minimal": "^1.10"
|
||||
},
|
||||
"require-dev": {
|
||||
"friendsofphp/php-cs-fixer": "^2.16",
|
||||
"friendsofphp/php-cs-fixer": "^2",
|
||||
"php-coveralls/php-coveralls": "^2.2",
|
||||
"phpunit/phpunit": "<6.0"
|
||||
},
|
||||
|
|
|
|||
Loading…
Reference in New Issue