Skip to content

Commit 7225f19

Browse files
committed
Updated Github actions
1 parent 71f7e25 commit 7225f19

File tree

5 files changed

+132
-5
lines changed

5 files changed

+132
-5
lines changed

.github/workflows/infection.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Mutations
2+
on: push
3+
jobs:
4+
infection:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: shivammathur/setup-php@v2
9+
with:
10+
php-version: '8.0'
11+
tools: composer:v2
12+
coverage: pcov
13+
- uses: actions/cache@v2
14+
with:
15+
path: '**/vendor'
16+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
17+
restore-keys: |
18+
${{ runner.os }}-composer-
19+
- uses: php-actions/composer@v5
20+
with:
21+
args: --prefer-dist
22+
php_version: 8.0
23+
24+
- name: Infection
25+
run: |
26+
wget -q https://github.com/infection/infection/releases/download/0.20.0/infection.phar
27+
wget -q https://github.com/infection/infection/releases/download/0.20.0/infection.phar.asc
28+
chmod +x infection.phar
29+
./infection.phar
30+
31+
- name: Store infection log
32+
uses: actions/upload-artifact@v2
33+
with:
34+
path: infection.log

.github/workflows/phpstan-5.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PHPStan level 5
2+
on: push
3+
jobs:
4+
phpstan:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: actions/cache@v2
9+
with:
10+
path: '**/vendor'
11+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
12+
restore-keys: |
13+
${{ runner.os }}-composer-
14+
- uses: php-actions/composer@v5
15+
with:
16+
args: --prefer-dist
17+
php_version: 8.0
18+
19+
- name: PHPStan
20+
uses: php-actions/phpstan@v2
21+
with:
22+
path: src/
23+
args: --level=5

.github/workflows/phpstan-7.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PHPStan level 7
2+
on: push
3+
jobs:
4+
phpstan:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: actions/cache@v2
9+
with:
10+
path: '**/vendor'
11+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
12+
restore-keys: |
13+
${{ runner.os }}-composer-
14+
- uses: php-actions/composer@v5
15+
with:
16+
args: --prefer-dist
17+
php_version: 8.0
18+
19+
- name: PHPStan
20+
uses: php-actions/phpstan@v2
21+
with:
22+
path: src/
23+
args: --level=5

.github/workflows/phpstan-8.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: PHPStan level 8
2+
on: push
3+
jobs:
4+
phpstan:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@v2
8+
- uses: actions/cache@v2
9+
with:
10+
path: '**/vendor'
11+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
12+
restore-keys: |
13+
${{ runner.os }}-composer-
14+
- uses: php-actions/composer@v5
15+
with:
16+
args: --prefer-dist
17+
php_version: 8.0
18+
19+
- name: PHPStan
20+
uses: php-actions/phpstan@v2
21+
with:
22+
path: src/
23+
args: --level=5
Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,36 @@ jobs:
1111
chmod a+x php-cs-fixer
1212
PHP_CS_FIXER_IGNORE_ENV=true ./php-cs-fixer fix src --dry-run
1313
14+
phpunit:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- uses: shivammathur/setup-php@v2
19+
with:
20+
php-version: '8.0'
21+
tools: composer:v2
22+
coverage: pcov
23+
- uses: actions/cache@v2
24+
with:
25+
path: '**/vendor'
26+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
27+
restore-keys: |
28+
${{ runner.os }}-composer-
29+
- uses: php-actions/composer@v5
30+
with:
31+
args: --prefer-dist
32+
php_version: 8.0
33+
34+
- name: Run tests & generate Coverage
35+
run: bin/phpunit --configuration=phpunit.xml tests --coverage-html var/coverage --whitelist=src
36+
37+
- name: Store coverage files
38+
uses: actions/upload-artifact@v2
39+
with:
40+
path: var/coverage
41+
1442
phpstan:
1543
runs-on: ubuntu-latest
16-
strategy:
17-
matrix:
18-
phpstan-level: [ 3, 5, 7, 8 ]
1944
steps:
2045
- uses: actions/checkout@v2
2146
- uses: actions/cache@v2
@@ -33,5 +58,4 @@ jobs:
3358
uses: php-actions/phpstan@v2
3459
with:
3560
path: src/
36-
args: --level=${{ matrix.phpstan-level }}
37-
61+
args: --level=4

0 commit comments

Comments
 (0)