Skip to content

Commit c3f9139

Browse files
committed
added jobs for mutation tests and static analysis
1 parent ca17134 commit c3f9139

File tree

1 file changed

+58
-1
lines changed

1 file changed

+58
-1
lines changed

.github/workflows/tests.yml

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@ on:
88

99
jobs:
1010
tests:
11+
name: Unit tests
1112
runs-on: ubuntu-latest
1213

1314
strategy:
1415
fail-fast: true
1516
matrix:
16-
php: [8.1]
17+
php: [8.1, 8.2]
1718

1819
name: PHP ${{ matrix.php }}
1920

@@ -33,3 +34,59 @@ jobs:
3334

3435
- name: Execute tests
3536
run: vendor/bin/phpunit --verbose
37+
38+
static-analysis:
39+
name: Code analysis with PHPStan
40+
runs-on: ubuntu-latest
41+
42+
strategy:
43+
fail-fast: true
44+
matrix:
45+
php: [8.1, 8.2]
46+
47+
name: PHP ${{ matrix.php }}
48+
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v2
52+
53+
- name: Install PHP
54+
uses: shivammathur/setup-php@v2
55+
with:
56+
php-version: ${{ matrix.php }}
57+
tools: composer:v2
58+
coverage: xdebug
59+
60+
- name: Install dependencies
61+
run: composer install
62+
63+
- name: Execute PHPStan analysis
64+
run: vendor/bin/phpstan --xdebug analyze src --level 8
65+
66+
mutation-tests:
67+
name: Mutation tests with Infection
68+
runs-on: ubuntu-latest
69+
70+
strategy:
71+
fail-fast: true
72+
matrix:
73+
php: [8.1, 8.2]
74+
75+
name: PHP ${{ matrix.php }}
76+
77+
steps:
78+
- name: Checkout
79+
uses: actions/checkout@v2
80+
81+
- name: Install PHP
82+
uses: shivammathur/setup-php@v2
83+
with:
84+
php-version: ${{ matrix.php }}
85+
tools: composer:v2
86+
coverage: xdebug
87+
88+
- name: Install dependencies
89+
run: composer install
90+
91+
- name: Execute mutation tests
92+
run: ./vendor/bin/infection --min-msi=40

0 commit comments

Comments
 (0)