From d3f2aa456b7e136cdc446aa378c631e94461834b Mon Sep 17 00:00:00 2001 From: Sergei Predvoditelev Date: Tue, 7 Jul 2026 08:15:58 +0300 Subject: [PATCH] Fix mutation CI --- .github/workflows/mutation.yml | 47 ++++++++++------------------------ 1 file changed, 13 insertions(+), 34 deletions(-) diff --git a/.github/workflows/mutation.yml b/.github/workflows/mutation.yml index 05ce48e..c801f73 100644 --- a/.github/workflows/mutation.yml +++ b/.github/workflows/mutation.yml @@ -1,23 +1,17 @@ +name: mutation test + on: pull_request: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' + paths: &paths + - 'src/**' + - 'tests/**' + - '.github/workflows/mutation.yml' + - 'composer.json' + - 'infection.json.dist' - 'psalm.xml' - push: - paths-ignore: - - 'docs/**' - - 'README.md' - - 'CHANGELOG.md' - - '.gitignore' - - '.gitattributes' - - 'psalm.xml' - -name: mutation test + branches: ['master'] + paths: *paths jobs: mutation: @@ -32,7 +26,6 @@ jobs: matrix: os: - ubuntu-latest - php: - 8.1 @@ -60,25 +53,11 @@ jobs: coverage: pcov tools: composer:v2 - - name: Determine composer cache directory - run: echo "COMPOSER_CACHE_DIR=$(composer config cache-dir)" >> $GITHUB_ENV - - - name: Cache dependencies installed with composer - uses: actions/cache@v6 - with: - path: ${{ env.COMPOSER_CACHE_DIR }} - key: php${{ matrix.php }}-composer-${{ hashFiles('**/composer.json') }} - restore-keys: | - php${{ matrix.php }}-composer- - - - name: Update composer - run: composer self-update - - - name: Install dependencies with composer - run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi + - name: Install Composer dependencies + uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0 - name: Run infection run: | - vendor/bin/roave-infection-static-analysis-plugin -j2 --ignore-msi-with-no-mutations --only-covered + vendor/bin/roave-infection-static-analysis-plugin --ignore-msi-with-no-mutations --only-covered env: STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}