@@ -10,13 +10,17 @@ jobs:
10
10
PHP :
11
11
strategy :
12
12
matrix :
13
- php-version : [8.1, 8.2, 8.3, 8.4]
13
+ php :
14
+ - {version: 8.1, tasks: 'composer,jsonlint,xmllint,yamllint,phpcs,phplint,phpmd,phpstan,securitychecker_enlightn'}
15
+ - {version: 8.2, tasks: 'composer,jsonlint,xmllint,yamllint,phpcs,phplint,phpmd,phpstan,securitychecker_enlightn'}
16
+ - {version: 8.3}
17
+ - {version: 8.4}
14
18
runs-on : ubuntu-latest
15
19
container :
16
- image : ${{ matrix.php- version == '8.1' && 'srcoder/development-php:php81-fpm' ||
17
- matrix.php- version == '8.2' && 'srcoder/development-php:php82-fpm' ||
18
- matrix.php- version == '8.3' && 'srcoder/development-php:php83-fpm' ||
19
- matrix.php- version == '8.4' && 'srcoder/development-php:php84-fpm' }}
20
+ image : ${{ matrix.php. version == '8.1' && 'srcoder/development-php:php81-fpm' ||
21
+ matrix.php. version == '8.2' && 'srcoder/development-php:php82-fpm' ||
22
+ matrix.php. version == '8.3' && 'srcoder/development-php:php83-fpm' ||
23
+ matrix.php. version == '8.4' && 'srcoder/development-php:php84-fpm' }}
20
24
steps :
21
25
- name : Checkout
22
26
uses : actions/checkout@v2
@@ -29,12 +33,10 @@ jobs:
29
33
30
34
- name : Run GrumPHP Tasks
31
35
run : |
32
- if [[ "${{ matrix.php-version }}" == "8.1" || "${{ matrix.php-version }}" == "8.2" ]]; then
33
- composer2 exec -v grumphp -- run --tasks=composer,jsonlint,xmllint,yamllint,phpcs,phplint,phpmd,phpstan,securitychecker_enlightn
34
- else
35
- composer2 exec -v grumphp -- run
36
+ runArguments=()
37
+ if [[ "${{ matrix.php.tasks }}" ]]; then
38
+ runArguments+=(--tasks="{{ matrix.php.tasks }}")
36
39
fi
40
+ composer2 exec -v grumphp -- run "${runArguments[@]}"
37
41
shell : bash
38
-
39
-
40
42
` ` `
0 commit comments