name: Tests
on:
    pull_request: null
    push:
        branches:
            - master
jobs:
    tests:
        runs-on: 'Ubuntu-20.04'
        strategy:
            fail-fast: false
            matrix:
                php: ['7.2', '7.3', '7.4', '8.0']
                include:
                    - php: '7.2'
                      dependencies: 'lowest'
                      composer-options: '--prefer-stable'

        name: PHP ${{ matrix.php }}
        steps:
            -   uses: actions/checkout@v2
            -   uses: shivammathur/setup-php@v2
                with:
                    php-version: '${{ matrix.php }}'
                    coverage: none
                    ini-values: 'memory_limit=-1'
            -   uses: "ramsey/composer-install@v1"
                with:
                    dependency-versions: '${{ matrix.dependencies }}'
                    composer-options: '${{ matrix.composer-options }}'
            -   name: Install PHPUnit
                run: vendor/bin/simple-phpunit install
            -   name: Run Unit tests
                run: vendor/bin/simple-phpunit
