Mutation #239
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: Mutation | |
| on: | |
| create: | |
| tags: | |
| - v* | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '22 17 * * *' # Run mutation tests every day at 17:22 UTC. | |
| # Time chosen randomly. | |
| permissions: {} | |
| jobs: | |
| infection: | |
| name: Infection on PHP ${{ matrix.php-versions }} | |
| runs-on: ${{ matrix.operating-system }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| operating-system: ['ubuntu-latest'] | |
| php-versions: ['8.4'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Setup PHP | |
| uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2.36.0 | |
| with: | |
| php-version: ${{ matrix.php-versions }} | |
| coverage: pcov | |
| - name: Add Infection as dependency | |
| run: composer require --dev infection/infection | |
| - name: Update dependencies | |
| run: composer update | |
| - name: Mutation Tests | |
| run: vendor/bin/infection --only-covering-test-cases | |
| - name: Print the mutation.log file for easy copy/paste from GitHub Actions | |
| run: cat infection.log |