Skip to content

Fix mutation CI (#43) #269

Fix mutation CI (#43)

Fix mutation CI (#43) #269

Workflow file for this run

name: mutation test
on:
pull_request:
paths: &paths
- 'src/**'
- 'tests/**'
- '.github/workflows/mutation.yml'
- 'composer.json'
- 'infection.json.dist'
- 'psalm.xml'
push:
branches: ['master']
paths: *paths
jobs:
mutation:
name: PHP ${{ matrix.php }}-${{ matrix.os }}
env:
extensions: pdo, pdo_pgsql
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-latest
php:
- 8.1
services:
postgres:
image: postgres:13
env:
POSTGRES_USER: root
POSTGRES_PASSWORD: root-password
POSTGRES_DB: yiitest
ports:
- 5432:5432
options: --name=postgres --health-cmd="pg_isready" --health-interval=10s --health-timeout=5s --health-retries=3
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-values: memory_limit=-1
coverage: pcov
tools: composer:v2
- name: Install Composer dependencies
uses: ramsey/composer-install@65e4f84970763564f46a70b8a54b90d033b3bdda # 4.0.0
- name: Run infection
run: |
vendor/bin/roave-infection-static-analysis-plugin --ignore-msi-with-no-mutations --only-covered
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}