Bump actions/cache from 4 to 5 #27
Workflow file for this run
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| release: | |
| types: [published] | |
| jobs: | |
| ################################################################################ | |
| # LINTING JOB: Runs once to check for code style issues. | |
| ################################################################################ | |
| lint: | |
| name: "PHP Linting" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: 8.4 | |
| tools: composer:v2 | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: vendor | |
| key: ubuntu-php-8.4-lint-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ubuntu-php-8.4-lint- | |
| - name: Install Dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Execute linter (Pint) | |
| run: composer lint | |
| ################################################################################ | |
| # TESTING JOB: Runs tests and handles coverage reporting. | |
| ################################################################################ | |
| tests: | |
| name: "P${{ matrix.php }} | L${{ matrix.laravel }}" | |
| needs: lint | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: [8.4] | |
| laravel: [12.*] # Matrix is kept to L12 due to PHP 8.4 requirement | |
| steps: | |
| - name: Checkout Code | |
| uses: actions/checkout@v6 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: mbstring, json, openssl, iconv | |
| coverage: xdebug | |
| - name: Cache Composer dependencies | |
| uses: actions/cache@v5 | |
| with: | |
| path: vendor | |
| key: ubuntu-${{ matrix.php }}-${{ matrix.laravel }}-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ubuntu-${{ matrix.php }}-${{ matrix.laravel }}- | |
| - name: Install Dependencies | |
| uses: ramsey/composer-install@v3 | |
| - name: Execute tests (PHPUnit) | |
| run: composer test-ci | |
| - name: Upload coverage to Codecov | |
| if: matrix.php == '8.4' && matrix.laravel == '12.*' | |
| uses: codecov/codecov-action@v5 | |
| - name: Upload test results to Codecov | |
| if: matrix.php == '8.4' && matrix.laravel == '12.*' | |
| uses: codecov/test-results-action@v1 |