blastcloud/hybrid

View on GitHub
.github/workflows/run-tests.yml

Summary

Maintainability
Test Coverage
name: run-tests

on: [push, pull_request]

jobs:
    test:
        runs-on: ${{ matrix.os }}
        strategy:
            fail-fast: true
            matrix:
                os: [ubuntu-latest]
                php: [8.3, 8.2, 8.1]
                phpunit: [9.6, 10.0, 11.0]
                dependency-version: [prefer-stable]
                exclude:
                  - php: 8.1
                    phpunit: 11.0

        name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

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

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

          -   name: Install dependencies
              run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction

          -   name: Proper PHPUnit
              run: composer require phpunit/phpunit:^${{ matrix.phpunit }} --update-with-dependencies

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