chore(deps): bump actions/cache from 5 to 6 #17
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 | |
| - 2.x | |
| pull_request: | |
| branches: | |
| - main | |
| - 2.x | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| static-analysis: | |
| name: Static analysis & code style | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.1' | |
| extensions: sockets, openssl | |
| coverage: none | |
| tools: composer:v2 | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: composer-${{ runner.os }}-${{ hashFiles('composer.json') }} | |
| restore-keys: composer-${{ runner.os }}- | |
| - name: Install dependencies | |
| run: composer install --no-interaction --no-progress --prefer-dist | |
| - name: PHPStan | |
| run: composer stan -- --no-progress | |
| - name: PHP-CS-Fixer (dry-run) | |
| run: composer cs-check | |
| tests: | |
| name: Tests (PHP ${{ matrix.php }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| php: ['8.1', '8.2', '8.3'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Set up PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| extensions: sockets, openssl, pcntl, posix | |
| coverage: pcov | |
| tools: composer:v2 | |
| - name: Get composer cache directory | |
| id: composer-cache | |
| run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT" | |
| - name: Cache composer dependencies | |
| uses: actions/cache@v6 | |
| with: | |
| path: ${{ steps.composer-cache.outputs.dir }} | |
| key: composer-${{ runner.os }}-php${{ matrix.php }}-${{ hashFiles('composer.json') }} | |
| restore-keys: composer-${{ runner.os }}-php${{ matrix.php }}- | |
| - name: Install dependencies | |
| run: composer install --no-interaction --no-progress --prefer-dist | |
| - name: Run test suite | |
| run: composer test-coverage | |
| - name: Upload coverage to Codecov | |
| if: matrix.php == '8.3' | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| files: build/coverage.xml | |
| fail_ci_if_error: false | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |