name: Tests

on:
  push:
  pull_request:
  schedule:
      - cron: '0 0 * * *'

jobs:
    php-tests:
        runs-on: ${{ matrix.os }}

        strategy:
            matrix:
                php: [7.4, 7.3, 7.2]
                os: [ubuntu-latest]

        name: P${{ matrix.php }}

        steps:
            - name: Checkout code
              uses: actions/checkout@v1

            - name: Setup PHP
              uses: shivammathur/setup-php@v1
              with:
                  php-version: ${{ matrix.php }}
                  coverage: none

            - name: Install dependencies
              run: composer install

            - name: Execute tests
              run: vendor/bin/phpunit
