Skip to content

Commit 9b4a98f

Browse files
committed
Composite action to DRY Infection version across repositories
1 parent f3fc3b5 commit 9b4a98f

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: 'Setup PHP with Infection'
2+
description: 'Setup PHP with Infection'
3+
inputs:
4+
php-version:
5+
description: 'PHP version'
6+
required: true
7+
php-extensions:
8+
description: 'PHP extensions'
9+
required: false
10+
default: ''
11+
runs:
12+
using: "composite"
13+
steps:
14+
- name: "Install PHP"
15+
uses: "shivammathur/setup-php@v2"
16+
with:
17+
coverage: "pcov"
18+
php-version: "${{ inputs.php-version }}"
19+
ini-file: development
20+
extensions: ${{ inputs.php-extensions }}
21+
tools: infection:0.31.7

.github/workflows/tests.yml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,9 @@ jobs:
4646
with:
4747
path: "build-infection"
4848

49-
- name: "Install PHP"
50-
uses: "shivammathur/setup-php@v2"
49+
- uses: ./build-infection/.github/actions/setup-php
5150
with:
52-
coverage: "pcov"
5351
php-version: "8.3"
54-
tools: "infection:0.31.7"
5552

5653
- name: "Install build-infection dependencies"
5754
working-directory: "build-infection"

0 commit comments

Comments
 (0)