-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (50 loc) · 1.46 KB
/
mutation-tests.yml
File metadata and controls
62 lines (50 loc) · 1.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
# SPDX-FileCopyrightText: 2026 LibreCode coop and contributors
# SPDX-License-Identifier: AGPL-3.0-or-later
name: Mutation tests
on:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: mutation-${{ github.run_id }}
cancel-in-progress: true
jobs:
php-version:
runs-on: ubuntu-latest
outputs:
min: ${{ steps.php.outputs.min }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
submodules: recursive
- name: Read PHP min version from composer.json
id: php
run: |
min=$(jq -r '.require.php' composer.json | grep -oP '\d+\.\d+' | head -1)
echo "min=$min" >> $GITHUB_OUTPUT
infection:
runs-on: ubuntu-latest
needs: php-version
name: infection PHP ${{ needs.php-version.outputs.min }}
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
submodules: recursive
- name: Set up PHP ${{ needs.php-version.outputs.min }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ needs.php-version.outputs.min }}
tools: composer:v2
coverage: xdebug
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: composer install --no-interaction --prefer-dist
- name: Run mutation tests
env:
XDEBUG_MODE: coverage
run: composer run test:mutation