9
9
10
10
jobs :
11
11
unit :
12
- name : " Unit and mutation tests for PHP ${{ matrix.php-version }} "
12
+ name : " Unit and mutation testing "
13
13
runs-on : ${{ matrix.os }}
14
14
continue-on-error : true
15
15
@@ -35,24 +35,19 @@ jobs:
35
35
ini-values : memory_limit=512M, xdebug.mode=off
36
36
tools : composer:${{ env.COMPOSER_VERSION }}
37
37
38
- - name : Get composer cache directory
38
+ - name : Get Composer cache directory
39
39
id : composer-cache
40
40
run : echo "::set-output name=dir::$(composer config cache-files-dir)"
41
41
42
- - name : Cache dependencies
42
+ - name : Restore Composer cache
43
43
uses : actions/cache@v2
44
44
with :
45
45
path : ${{ steps.composer-cache.outputs.dir }}
46
46
key : composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}
47
- restore-keys : |
48
- composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}-
49
- composer-${{ runner.os }}-${{ matrix.php-version }}-
50
- composer-${{ runner.os }}-
51
- composer-
47
+ restore-keys : composer-${{ runner.os }}-${{ matrix.php-version }}-
52
48
53
49
- name : Install dependencies
54
- run : |
55
- composer install --no-interaction --prefer-dist --no-progress
50
+ run : composer install --no-interaction --prefer-dist --no-progress
56
51
57
52
- name : Run unit tests
58
53
run : |
61
56
62
57
- name : Run mutation tests
63
58
run : XDEBUG_MODE=coverage php vendor/bin/infection --show-mutations --min-msi=${{ env.MINIMUM_MSI_PERCENTAGE }} --threads=4
59
+
60
+ lint :
61
+ name : " Linting"
62
+ runs-on : ${{ matrix.os }}
63
+ continue-on-error : true
64
+
65
+ strategy :
66
+ matrix :
67
+ os : [ "ubuntu-latest" ]
68
+ php-version : [ "8.1" ]
69
+
70
+ env :
71
+ COMPOSER_VERSION : 2
72
+ PHP_CS_FIXER_CACHE_FILE : .php-cs-fixer.cache
73
+
74
+ steps :
75
+ - name : Checkout repository
76
+ uses : actions/checkout@v3
77
+
78
+ - name : Setup PHP
79
+ uses : shivammathur/setup-php@v2
80
+ with :
81
+ php-version : ${{ matrix.php-version }}
82
+
83
+ - name : Get Composer cache directory
84
+ id : composer-cache
85
+ run : echo "::set-output name=dir::$(composer config cache-files-dir)"
86
+
87
+ - name : Restore Composer cache
88
+ uses : actions/cache@v2
89
+ with :
90
+ path : ${{ steps.composer-cache.outputs.dir }}
91
+ key : composer-${{ runner.os }}-${{ matrix.php-version }}-${{ hashFiles('composer.*') }}
92
+ restore-keys : composer-${{ runner.os }}-${{ matrix.php-version }}-
93
+
94
+ - name : Install dependencies
95
+ run : |
96
+ composer install --no-interaction --prefer-dist --no-progress
97
+
98
+ - name : Run PHP-CS-Fixer
99
+ run : php vendor/bin/php-cs-fixer fix --config .php-cs-fixer.dist.php --verbose --dry-run
0 commit comments