mirror of
https://github.com/danog/Valinor.git
synced 2024-11-26 20:24:40 +01:00
4492ef73dc
Bumps [actions/cache](https://github.com/actions/cache) from 3.0.10 to 3.0.11. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](https://github.com/actions/cache/compare/v3.0.10...v3.0.11) --- updated-dependencies: - dependency-name: actions/cache dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
name: Mutation tests
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
jobs:
|
|
mutation:
|
|
name: Mutation tests
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
php-version: '8.1'
|
|
php-extensions: pcov, yaml
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0 # Needed for the `git diff` used below for Infection
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: ${{ env.php-version }}
|
|
extensions: ${{ env.php-extensions }}
|
|
ini-values: zend.assertions=1
|
|
|
|
- uses: "ramsey/composer-install@v2"
|
|
|
|
- name: Creating var directory
|
|
run: mkdir -p var/cache
|
|
|
|
- name: Cache Mutation results
|
|
uses: actions/cache@v3.0.11
|
|
with:
|
|
path: var/cache
|
|
key: ${{ runner.os }}-qa-${{ hashFiles('composer.lock') }}-${{ hashFiles('.github/workflows/mutation.yml') }}
|
|
|
|
- name: Running mutation tests
|
|
if: github.ref == 'refs/heads/master'
|
|
run: php vendor/bin/infection --threads=$(nproc)
|
|
env:
|
|
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
|
|
|
|
- name: Running mutation tests
|
|
if: github.event_name == 'pull_request'
|
|
run: |
|
|
git fetch --depth=1 origin $GITHUB_BASE_REF
|
|
php vendor/bin/infection --threads=$(nproc) --git-diff-lines --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations --only-covered
|