Upgrade tools #37
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: Check Build | |
| on: [ pull_request ] | |
| jobs: | |
| composer-require-checker: | |
| strategy: | |
| matrix: | |
| php: ["8.3", "8.4"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| - 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 }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.php }}- | |
| - name: Install dependencies | |
| run: composer update --no-interaction --no-progress --no-suggest | |
| - name: Composer Require Checker | |
| run: composer check-deps | |
| code-style: | |
| strategy: | |
| matrix: | |
| php: ["8.3", "8.4"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| - 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 }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.php }}- | |
| - name: Install dependencies | |
| run: composer update --no-interaction --no-progress --no-suggest | |
| - name: PHP Code Style | |
| run: PHP_CS_FIXER_IGNORE_ENV=1 composer cs-check | |
| phpstan: | |
| strategy: | |
| matrix: | |
| php: ["8.3", "8.4"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| - 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 }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.php }}- | |
| - name: Install dependencies | |
| run: composer update --no-interaction --no-progress --no-suggest | |
| - name: PHPStan | |
| run: composer phpstan | |
| psalm: | |
| strategy: | |
| matrix: | |
| php: ["8.3", "8.4"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| - 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 }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.php }}- | |
| - name: Install dependencies | |
| run: composer update --no-interaction --no-progress --no-suggest | |
| - name: Psalm | |
| run: composer psalm | |
| infection: | |
| strategy: | |
| matrix: | |
| php: ["8.3", "8.4"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| - 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 }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.php }}- | |
| - name: Install dependencies | |
| run: composer update --no-interaction --no-progress --no-suggest | |
| - name: Infection coverage of changed lines | |
| if: "!contains(github.event.pull_request.labels.*.name, 'skip-infection')" | |
| run: | | |
| git fetch origin $GITHUB_BASE_REF $GITHUB_HEAD_REF | |
| vendor/bin/infection \ | |
| --git-diff-base=origin/$GITHUB_BASE_REF \ | |
| --git-diff-lines \ | |
| --logger-github \ | |
| --min-msi=100 \ | |
| --min-covered-msi=100 \ | |
| --ignore-msi-with-no-mutations \ | |
| -jmax | |
| - name: Save Infection result | |
| uses: actions/upload-artifact@v4 | |
| if: always() | |
| with: | |
| name: infection-log-${{ matrix.php }}.txt | |
| path: infection-log.txt | |
| phpunit: | |
| strategy: | |
| matrix: | |
| php: ["8.3", "8.4"] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@v2 | |
| with: | |
| php-version: ${{ matrix.php }} | |
| - 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 }}-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} | |
| restore-keys: ${{ runner.os }}-${{ matrix.php }}- | |
| - name: Install dependencies | |
| run: composer update --no-interaction --no-progress --no-suggest | |
| - name: Tests | |
| run: vendor/bin/phpunit --coverage-clover=coverage.xml --stop-on-failure | |