-
Notifications
You must be signed in to change notification settings - Fork 545
Setup mutation testing #4480
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Setup mutation testing #4480
Changes from 9 commits
1c439c9
8954c43
8b10978
e2bd318
b0196f9
ade0aff
a0bd193
b61b526
4863a3c
b636db2
3dc53c0
447ad11
823cf3b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -222,3 +222,71 @@ jobs: | |
|
|
||
| - name: "Tests" | ||
| run: "make tests" | ||
|
|
||
| mutation-testing: | ||
staabm marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| name: "Mutation Testing" | ||
| runs-on: "ubuntu-latest" | ||
| needs: ["tests", "tests-levels"] | ||
|
||
|
|
||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| php-version: | ||
| - "8.2" | ||
| - "8.3" | ||
| - "8.4" | ||
| operating-system: [ubuntu-latest] | ||
|
|
||
| steps: | ||
| - name: "Checkout" | ||
| uses: actions/checkout@v5 | ||
|
|
||
| - name: "Install PHP" | ||
staabm marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| uses: "shivammathur/setup-php@v2" | ||
| with: | ||
| coverage: "pcov" | ||
| php-version: "${{ matrix.php-version }}" | ||
| ini-file: development | ||
| extensions: ds,mbstring | ||
| tools: infection:0.31.7 | ||
|
|
||
| - name: "Install dependencies" | ||
| run: "composer install --no-interaction --no-progress" | ||
|
|
||
| - name: "Checkout build-infection" | ||
| uses: actions/checkout@v5 | ||
| with: | ||
| repository: "phpstan/build-infection" | ||
| path: "build-infection" | ||
| ref: "1.x" | ||
|
|
||
| - name: "Install build-infection dependencies" | ||
| working-directory: "build-infection" | ||
| run: "composer install --no-interaction --no-progress" | ||
|
|
||
| - name: "Configure infection" | ||
| run: | | ||
| php build-infection/bin/infection-config.php \ | ||
| > infection.json5 | ||
| cat infection.json5 | jq | ||
|
|
||
| - name: "Cache Result cache" | ||
| uses: actions/cache@v4 | ||
|
||
| with: | ||
| path: ./tmp | ||
| key: "result-cache-v1-${{ matrix.php-version }}-${{ github.run_id }}" | ||
| restore-keys: | | ||
| result-cache-v1-${{ matrix.php-version }}- | ||
|
|
||
| - name: "Run infection" | ||
| run: | | ||
| git fetch --depth=1 origin $GITHUB_BASE_REF | ||
| infection \ | ||
| --git-diff-base=origin/$GITHUB_BASE_REF \ | ||
| --git-diff-lines \ | ||
| --ignore-msi-with-no-mutations \ | ||
| --min-msi=100 \ | ||
| --min-covered-msi=100 \ | ||
| --log-verbosity=all \ | ||
| --debug \ | ||
| --logger-text=php://stdout | ||