Skip to content

Merge branch '5.11.x' #667

Merge branch '5.11.x'

Merge branch '5.11.x' #667

name: Mutation tests
on:
push:
branches:
- master
- 6.0.x
pull_request:
branches:
- master
- 6.0.x
jobs:
tests:
name: Mutation tests with PHP ${{ matrix.php-version }}
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
php-version: [ '8.2' ]
operating-system: [ ubuntu-latest ]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Fetch github.base_ref (for diffing)
if: ${{ github.base_ref != '' }}
run: |
git fetch --depth=1 origin +refs/heads/${{ github.base_ref }}:refs/remotes/origin/${{ github.base_ref }}
- name: Set up PHP ${{ matrix.php-version }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
coverage: pcov
ini-values: memory_limit=-1
tools: infection
- name: Install Composer dependencies
uses: ramsey/composer-install@v3
- name: Collect coverage report
run: composer run phpunit -- --stop-on-failure
- name: Infection
if: ${{ github.base_ref != '' }}
run: |
CHANGED_FILES=$(git diff origin/$GITHUB_BASE_REF --diff-filter=AM --name-only | grep src/ | paste -sd "," -);
infection -j$(nproc) --skip-initial-tests --no-interaction --no-progress --coverage=build/logs \
--ignore-msi-with-no-mutations \
--filter=$CHANGED_FILES
env:
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
- name: Infection
if: ${{ github.base_ref == '' }}
run: |
infection -j$(nproc) --skip-initial-tests --no-interaction --no-progress --coverage=build/logs
env:
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}