Breaking: Test on php 8.4, allow Laravel 12, remove php 8.1, drop ill… #50
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: PSR-12 coding standard, Test, Coverage | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - master | |
| - dev | |
| jobs: | |
| coding-standard: | |
| name: PSR-12 coding standard | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.2 | |
| - name: Install PHP code sniffer | |
| run: composer global require squizlabs/php_codesniffer | |
| - name: Check against PSR12 standard | |
| run: | | |
| `composer global config bin-dir --absolute --quiet`/phpcs --standard=PSR12 --ignore="src/Facades/*" ./src | |
| tests: | |
| needs: coding-standard | |
| name: "OS: ${{ matrix.os }} | PHP: ${{ matrix.php }} | Laravel: ${{ matrix.laravel }}" | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ ubuntu-latest ] | |
| php: [ 8.1, 8.2, 8.3, 8.4 ] | |
| laravel: [ 10, 11, 12 ] | |
| exclude: | |
| - php: 8.1 | |
| laravel: 11 | |
| - php: 8.1 | |
| laravel: 12 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| - name: Install dependencies | |
| run: | | |
| composer require illuminate/support:^${{ matrix.laravel }} --no-interaction --prefer-dist | |
| - name: Run tests | |
| run: ./vendor/bin/phpunit --testdox | |
| coverage: | |
| needs: tests | |
| name: Coverage | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Install PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| coverage: pcov | |
| php-version: 8.4 | |
| - name: Install dependencies | |
| run: composer install --no-interaction --prefer-dist | |
| - name: Run tests for coverage | |
| run: ./vendor/bin/phpunit --coverage-clover=coverage.xml | |
| - name: Push to Codecov | |
| run: bash <(curl -s https://codecov.io/bash) | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |