Skip to content

Commit f667e82

Browse files
authored
Merge pull request #737 from wayofdev/feat/infra-dx
2 parents 96d9b94 + e94d223 commit f667e82

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/testing.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,61 @@ jobs:
7474
files: .build/phpunit/logs/clover.xml
7575
token: ${{ secrets.CODECOV_TOKEN }}
7676
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

Comments
 (0)