mirror of
https://github.com/ivuorinen/xkcd-Mailer.git
synced 2026-01-26 11:14:06 +00:00
38 lines
1.1 KiB
YAML
38 lines
1.1 KiB
YAML
name: PHP CS Checks
|
|
|
|
on: [ push ]
|
|
|
|
jobs:
|
|
phpcs-check:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
|
|
|
|
- name: Validate composer.json and composer.lock
|
|
run: composer validate
|
|
|
|
- name: Cache Composer packages
|
|
id: composer-cache
|
|
uses: actions/cache@1bd1e32a3bdc45362d1e726936510720a7c30a57 # v4
|
|
with:
|
|
path: vendor
|
|
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-php-
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@9e72090525849c5e82e596468b86eb55e9cc5401 # v2
|
|
with:
|
|
php-version: 7.4
|
|
extensions: simplexml
|
|
coverage: xdebug
|
|
env:
|
|
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Run PHPCS Check
|
|
run: |
|
|
composer install --prefer-dist --no-progress
|
|
composer require staabm/annotate-pull-request-from-checkstyle
|
|
./vendor/bin/phpcs -q --report=checkstyle | vendor/bin/cs2pr --graceful-warnings
|