Add test cases to handle different PHP version behavior #7
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: Pipes | |
| on: | |
| pull_request: | |
| branches: | |
| - master | |
| types: | |
| - labeled | |
| - unlabeled | |
| - opened | |
| - synchronize | |
| paths: | |
| - 'composer.json' | |
| - '.github/**' | |
| - 'assets/templates/**' | |
| - 'src/**' | |
| - 'tests/**' | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - 'composer.json' | |
| - '.github/**' | |
| - 'assets/templates/**' | |
| - 'src/**' | |
| - 'tests/**' | |
| jobs: | |
| php82: | |
| name: PHP 8.2 | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.event_name == 'push' | |
| || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci')) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.2' | |
| - name: Validate composer.json | |
| run: composer validate --strict | |
| - name: Cache Composer packages | |
| id: composer-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-${{ github.job}}-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ github.job}}- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run checks | |
| run: composer run check | |
| php85: | |
| name: PHP 8.5 | |
| runs-on: ubuntu-latest | |
| if: | | |
| github.event_name == 'push' | |
| || (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'ci')) | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: '8.5' | |
| - name: Validate composer.json | |
| run: composer validate --strict | |
| - name: Cache Composer packages | |
| id: composer-cache | |
| uses: actions/cache@v3 | |
| with: | |
| path: vendor | |
| key: ${{ runner.os }}-${{ github.job}}-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-${{ github.job}}- | |
| - name: Install dependencies | |
| run: composer install --prefer-dist --no-progress | |
| - name: Run checks | |
| run: composer run check |