From b18a9ba3c9722b93165c70e402dcc7079ffaa59d Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Fri, 1 May 2020 01:47:50 +0100 Subject: [PATCH] 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 --- .github/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..10c77d0 --- /dev/null +++ b/.github/workflows/ci.yml @@ -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