@@ -20,45 +20,43 @@ jobs:
20
20
wget https://github.com/FriendsOfPHP/PHP-CS-Fixer/releases/download/v2.16.4/php-cs-fixer.phar -q
21
21
php php-cs-fixer.phar fix --dry-run --diff
22
22
23
- tests-php-7-2-lowest :
23
+ tests :
24
24
runs-on : ubuntu-latest
25
+ strategy :
26
+ fail-fast : false
27
+ matrix :
28
+ php-version : ['7.4', '8.0', '8.1']
29
+ prefer-lowest : ['']
30
+ include :
31
+ - php-version : ' 7.2'
32
+ prefer-lowest : ' prefer-lowest'
25
33
steps :
26
34
- uses : actions/checkout@master
27
- - uses : shivammathur/setup-php@v2
28
- with :
29
- php-version : ' 7.2'
30
- extensions : gd
31
- - name : PHPUnit
32
- run : |
33
- composer update --prefer-dist --no-interaction --no-ansi --no-progress --prefer-lowest
34
- php vendor/bin/phpunit
35
35
36
- tests-php-7-4 :
37
- runs-on : ubuntu-latest
38
- steps :
39
- - uses : actions/checkout@master
40
36
- uses : shivammathur/setup-php@v2
41
37
with :
42
- php-version : ' 7.4 '
38
+ php-version : ${{ matrix.php-version }}
43
39
extensions : gd
44
- - name : PHPUnit
40
+ coverage : pcov
41
+
42
+ - name : Composer
45
43
run : |
46
- composer update --prefer-dist --no-interaction --no-ansi --no-progress
47
- php vendor/bin/phpunit
44
+ if ${{ matrix.prefer-lowest == 'prefer-lowest' }}; then
45
+ composer update --no-interaction --no-ansi --no-progress --prefer-lowest
46
+ else
47
+ composer update --no-interaction --no-ansi --no-progress
48
+ fi
48
49
49
- tests-php-8-0 :
50
- runs-on : ubuntu-latest
51
- steps :
52
- - uses : actions/checkout@master
53
- - uses : shivammathur/setup-php@v2
54
- with :
55
- php-version : ' 8.0'
56
- extensions : gd
57
50
- name : PHPUnit
58
51
run : |
59
- composer update --prefer-dist --no-interaction --no-ansi --no-progress
60
- php vendor/bin/phpunit --coverage-clover=coverage.xml
52
+ if [[ ${{ matrix.php-version }} == '8.1' ]]; then
53
+ vendor/bin/phpunit --verbose --coverage-clover=coverage.xml
54
+ else
55
+ vendor/bin/phpunit
56
+ fi
57
+
61
58
- name : Code Coverage Report
59
+ if : matrix.php-version == '8.1'
62
60
uses : codecov/codecov-action@v1
63
61
64
62
psalm :
0 commit comments