# yaml-language-server: $schema=https://json.schemastore.org/github-workflow

name: Integrate

on:
    pull_request: null
    push:
        branches:
            - master

jobs:
    unit_tests:
        name: Unit tests
        strategy:
            fail-fast: false
            matrix:
                php-version:
                - 8.0
                - 8.1
                - 8.2
                - 8.3
                - 8.4
        runs-on: ubuntu-latest
        steps:
        -
            name: Set up PHP
            uses: shivammathur/setup-php@v2
            with:
                php-version: ${{ matrix.php-version }}
        -
            name: Setup problem matcher for PHPUnit
            run: |
                echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json
        -
            name: Checkout repository
            uses: actions/checkout@v4
        -
            name: Install dependencies
            uses: ramsey/composer-install@v3
            with:
                dependency-versions: highest
        -
            name: Execute unit tests
            run: composer exec -- phpunit
