|
74 | 74 | files: .build/phpunit/logs/clover.xml
|
75 | 75 | token: ${{ secrets.CODECOV_TOKEN }}
|
76 | 76 | verbose: true
|
| 77 | + |
| 78 | + mutation-testing: |
| 79 | + timeout-minutes: 16 |
| 80 | + runs-on: ${{ matrix.os }} |
| 81 | + concurrency: |
| 82 | + cancel-in-progress: true |
| 83 | + group: mutation-testing-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 84 | + strategy: |
| 85 | + fail-fast: true |
| 86 | + matrix: |
| 87 | + os: |
| 88 | + - ubuntu-latest |
| 89 | + php-version: |
| 90 | + - '8.2' |
| 91 | + dependencies: |
| 92 | + - locked |
| 93 | + steps: |
| 94 | + - name: 📦 Check out the codebase |
| 95 | + uses: actions/checkout@v4.1.5 |
| 96 | + |
| 97 | + - name: 🛠️ Setup PHP |
| 98 | + uses: shivammathur/setup-php@2.30.4 |
| 99 | + with: |
| 100 | + php-version: ${{ matrix.php-version }} |
| 101 | + extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, pdo_sqlite |
| 102 | + ini-values: error_reporting=E_ALL |
| 103 | + coverage: xdebug |
| 104 | + |
| 105 | + - name: 🛠️ Setup problem matchers |
| 106 | + run: | |
| 107 | + echo "::add-matcher::${{ runner.tool_cache }}/php.json" |
| 108 | + echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" |
| 109 | +
|
| 110 | + - name: 🤖 Validate composer.json and composer.lock |
| 111 | + run: composer validate --ansi --strict |
| 112 | + |
| 113 | + - name: 🔍 Get composer cache directory |
| 114 | + uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0 |
| 115 | + |
| 116 | + - name: ♻️ Restore cached dependencies installed with composer |
| 117 | + uses: actions/cache@v4.0.2 |
| 118 | + with: |
| 119 | + path: ${{ env.COMPOSER_CACHE_DIR }} |
| 120 | + key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }} |
| 121 | + restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}- |
| 122 | + |
| 123 | + - name: 📥 Install "${{ matrix.dependencies }}" dependencies |
| 124 | + uses: wayofdev/gh-actions/actions/composer/install@v3.1.0 |
| 125 | + with: |
| 126 | + dependencies: ${{ matrix.dependencies }} |
| 127 | + |
| 128 | + - name: 🧪 Run mutation testing using Xdebug and infection/infection |
| 129 | + env: |
| 130 | + STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} |
| 131 | + XDEBUG_MODE: coverage |
| 132 | + DB_CONNECTION: sqlite |
| 133 | + DB_DATABASE: ':memory:' |
| 134 | + run: composer infect:ci |
0 commit comments