name: "Continuous Integration"

on:
    pull_request:
        paths-ignore:
            - "*.md"
    push:
        branches-ignore:
            - 'dependabot/**'
    release:
        types: [ created ]
    workflow_dispatch: ~

jobs:
    tests:
        runs-on: "ubuntu-latest"

        name: "Tests ${{ matrix.php }}"

        strategy:
            fail-fast: false
            matrix:
                php: ["7.2", "7.3", "7.4", "8.0", "8.1", "8.2"]

        steps:
            -   name: "Checkout"
                uses: "actions/checkout@v2"

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

            -   name: "Install dependencies with Composer"
                uses: "ramsey/composer-install@v1"

            -   name: "Run PHPUnit"
                run: "vendor/bin/phpunit"
