Skip to content

Commit

Permalink
Add github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
t0mmie committed Aug 5, 2020
1 parent fe6d89a commit 420c634
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/php-checks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
on: [push]
name: PHP checks
jobs:
composer-check:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.2', '7.3', '7.4']
name: PHP ${{ matrix.php-versions }} tests
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: cs2pr

- name: Get composer cache directory
id: composer-cache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v1
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}

- name: Run Composer install
run: composer install --prefer-dist

- name: Run PHP checks
run: composer phpcheck

- name: Run PHPUnit
run: composer phpunit

0 comments on commit 420c634

Please sign in to comment.