Add a GitHub Actions workflow for PHPCS

Ensure that the code matches the PSR-12 coding standards by
automatically running PHPCS for each push and pull request.

Fixes #5
This commit is contained in:
Oliver Davies 2020-05-01 01:47:50 +01:00 committed by Oliver Davies
parent 08d9465cf0
commit b18a9ba3c9

29
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,29 @@
---
name: CI
on: [push, pull_request]
jobs:
phpcs:
runs-on: ubuntu-latest
strategy:
matrix:
php-version: ['7.4']
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Configure PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
- name: Install Composer dependencies
run: >
composer install --no-progress --no-suggest --prefer-dist \
--optimize-autoloader
- name: Run PHPCS
run: vendor/bin/phpcs -v