Skip to content

Commit

Permalink
Merge pull request #737 from wayofdev/feat/infra-dx
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp authored May 26, 2024
2 parents 96d9b94 + e94d223 commit f667e82
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,3 +74,61 @@ jobs:
files: .build/phpunit/logs/clover.xml
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

mutation-testing:
timeout-minutes: 16
runs-on: ${{ matrix.os }}
concurrency:
cancel-in-progress: true
group: mutation-testing-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
strategy:
fail-fast: true
matrix:
os:
- ubuntu-latest
php-version:
- '8.2'
dependencies:
- locked
steps:
- name: 📦 Check out the codebase
uses: actions/[email protected]

- name: 🛠️ Setup PHP
uses: shivammathur/[email protected]
with:
php-version: ${{ matrix.php-version }}
extensions: none, ctype, dom, json, mbstring, simplexml, tokenizer, xml, xmlwriter, pdo, curl, fileinfo, pdo_mysql, pdo_sqlite
ini-values: error_reporting=E_ALL
coverage: xdebug

- name: 🛠️ Setup problem matchers
run: |
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: 🤖 Validate composer.json and composer.lock
run: composer validate --ansi --strict

- name: 🔍 Get composer cache directory
uses: wayofdev/gh-actions/actions/composer/[email protected]

- name: ♻️ Restore cached dependencies installed with composer
uses: actions/[email protected]
with:
path: ${{ env.COMPOSER_CACHE_DIR }}
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-

- name: 📥 Install "${{ matrix.dependencies }}" dependencies
uses: wayofdev/gh-actions/actions/composer/[email protected]
with:
dependencies: ${{ matrix.dependencies }}

- name: 🧪 Run mutation testing using Xdebug and infection/infection
env:
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}
XDEBUG_MODE: coverage
DB_CONNECTION: sqlite
DB_DATABASE: ':memory:'
run: composer infect:ci

0 comments on commit f667e82

Please sign in to comment.