name: Unit Tests

on:
    pull_request: null
    push:
        branches:
            - master

jobs:
    unit_tests:
        runs-on: ubuntu-latest
        strategy:
            matrix:
                php: ['7.2', '7.3', '7.4']

        steps:
            -   uses: actions/checkout@v2
            -   uses: shivammathur/setup-php@v1
                with:
                    php-version: ${{ matrix.php }}
                    coverage: none # default is xdebug
                    extensions: mbstring # needed by phpunit

            -   run: composer install --no-progress
            -   run: vendor/bin/phpunit
