diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c566dcb..0b131df 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,7 @@ on: branches: [ master ] jobs: - lint: + tests: runs-on: ubuntu-latest name: 'Lint' steps: @@ -28,7 +28,7 @@ jobs: - name: Setup PHP uses: shivammathur/setup-php@v2 with: - php-version: '8.1' + php-version: '8.3' coverage: pcov - name: Install dependencies @@ -40,13 +40,6 @@ jobs: - name: PHP-CS-Fixer run: ./vendor/bin/php-cs-fixer fix --dry-run - - name: test coverage - run: | - ./vendor/bin/phpunit --coverage-clover=coverage.xml - bash <(curl -s https://codecov.io/bash) - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} - - name: Infection run: ./vendor/bin/infection --min-msi=100 env: @@ -54,62 +47,3 @@ jobs: - name: PHPStan run: ./vendor/bin/phpstan - - tests: - runs-on: ubuntu-latest - name: 'PHP: ${{ matrix.php }}; Laravel: ${{ matrix.laravel }}; Prefer: ${{ matrix.prefer }}' - strategy: - matrix: - php: ['8.1', '8.2', '8.3'] - laravel: ['^10.0', '^11.0'] - prefer: ['prefer-lowest', 'prefer-stable'] - include: - - laravel: '^10.0' - testbench: '^8.0' - - laravel: '^11.0' - testbench: '^9.0' - exclude: - - php: '8.3' - laravel: '^10.0' - - php: '8.1' - laravel: '^11.0' - - steps: - - name: checkout code - uses: actions/checkout@v4 - - - name: Get composer cache directory - id: composer-cache - run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT - - - name: Cache dependencies - uses: actions/cache@v4 - with: - path: ${{ steps.composer-cache.outputs.dir }} - key: ${{ runner.os }}-composer-${{ matrix.prefer }}-php-${{ matrix.php }}-phpunit-${{ matrix.phpunit }}-${{ hashFiles('**/composer.json') }} - restore-keys: ${{ runner.os }}-composer-${{ matrix.prefer }}-php-${{ matrix.php }}-phpunit-${{ matrix.phpunit }}- - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php }} - coverage: none - - - name: Support prefer-lowest in PHP 8.1 - if: ${{ matrix.php == 8.1 && matrix.prefer == 'prefer-lowest' }} - run: composer require --no-update --no-scripts phpunit/phpunit:">=9.0" symfony/http-foundation:">=5.3.7" illuminate/http:">=8.62.0" nesbot/carbon:">=2.51.0" - - - name: Setup PHPUnit configuration - if: matrix.phpunit == '^9.0' - run: cp --force phpunit.9.xml.dist phpunit.xml.dist - - - name: Install dependencies - run: | - composer require --no-update 'illuminate/support:${{ matrix.laravel }}' 'orchestra/testbench:${{ matrix.testbench }}' - composer update --${{ matrix.prefer }} --no-scripts - - - name: Check platform requirements - run: composer check-platform-reqs - - - name: Run tests - run: ./vendor/bin/phpunit diff --git a/.gitignore b/.gitignore index 916545c..b108781 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,5 @@ /.phpunit.result.cache /.phpunit.cache /.php_cs.cache -/coverage /infection.log /.php-cs-fixer.cache diff --git a/readme.md b/readme.md index 4f76696..96450a6 100644 --- a/readme.md +++ b/readme.md @@ -10,7 +10,7 @@ Read more about the why in my blog post [Rethinking Laravel's middleware argumen ## Version support -- **PHP**: 8.2, 8.3 +- **PHP**: 8.1, 8.2, 8.3 - **Laravel**: 10.0, 11.0 ## Installation