mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-25 16:27:20 +00:00
55 lines
1.5 KiB
YAML
55 lines
1.5 KiB
YAML
|
name: PHP Coding Standard
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- 'master'
|
||
|
pull_request:
|
||
|
branches:
|
||
|
- '*'
|
||
|
|
||
|
permissions:
|
||
|
contents: read
|
||
|
|
||
|
jobs:
|
||
|
phpcs:
|
||
|
runs-on: ubuntu-latest
|
||
|
|
||
|
strategy:
|
||
|
fail-fast: false
|
||
|
matrix:
|
||
|
php-version:
|
||
|
- '7.4'
|
||
|
|
||
|
steps:
|
||
|
- name: Checkout
|
||
|
uses: actions/checkout@v3
|
||
|
|
||
|
- name: Install PHP with extensions
|
||
|
uses: shivammathur/setup-php@v2
|
||
|
with:
|
||
|
php-version: ${{ matrix.php-version }}
|
||
|
ini-values: assert.exception=1, zend.assertions=1, error_reporting=-1, log_errors_max_len=0, display_errors=On
|
||
|
tools: composer
|
||
|
|
||
|
- name: Composer get cache directory
|
||
|
id: composer-cache
|
||
|
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
||
|
|
||
|
- name: Cache Composer
|
||
|
uses: actions/cache@v3
|
||
|
with:
|
||
|
path: ${{ steps.composer-cache.outputs.dir }}
|
||
|
key: ${{ runner.os }}-php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }}
|
||
|
restore-keys: |
|
||
|
${{ runner.os }}-php${{ matrix.php-version }}-composer-
|
||
|
|
||
|
- name: Install Composer Packages
|
||
|
run: composer install --no-ansi --no-interaction --no-progress --ignore-platform-req=php
|
||
|
|
||
|
- name: Install CodeSniffer Rule
|
||
|
run: vendors/bin/phpcs --config-set installed_paths vendors/cakephp/cakephp-codesniffer
|
||
|
|
||
|
- name: Check CodeSniffer
|
||
|
run: vendors/bin/phpcs -p --extensions=php --standard=ruleset.xml ./lib/Cake
|