name: CI

on: [push, pull_request]

jobs:
  phpunit:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        php: [7.2, 7.3, 7.4, 8.0]
    steps:
      - uses: actions/checkout@v1
      - uses: shivammathur/setup-php@v2
        with:
          php-version: ${{ matrix.php }}
      - name: Validate Composer files
        run: composer validate --no-check-all --strict
      - name: Install Composer dependencies
        run: composer update --prefer-dist --no-progress
      - name: Run tests
        run: php vendor/bin/phpunit
