17
17
- name : Install PHP
18
18
uses : shivammathur/setup-php@v2
19
19
with :
20
- php-version : ' 7.4 '
20
+ php-version : ' 8.1 '
21
21
coverage : ' none'
22
22
- name : Cache dependencies
23
23
uses : actions/cache@v3
52
52
- " "
53
53
include :
54
54
- os : windows-latest
55
- php_version : 8.0
55
+ php_version : 8.1
56
56
dependencies_level : --prefer-lowest
57
+ - os : windows-latest
58
+ php_version : 8.1
59
+ dependencies_level : ' '
57
60
runs-on : ${{ matrix.os }}
58
61
steps :
59
62
- name : Set git to use LF on windows
@@ -76,22 +79,14 @@ jobs:
76
79
key : " cache-composer-${{ hashFiles('composer.json') }}"
77
80
restore-keys : ' cache-composer-'
78
81
- name : Run composer
79
- if : ${{ matrix.php_version != '8.0' && matrix.php_version != '8.1' && matrix.php_version != '8.2' && matrix.php_version != '8.3' }}
80
82
run : composer update ${{ matrix.dependencies_level }} --prefer-dist --no-interaction --no-progress
81
- - name : Run composer with workaround for PHP 8 and incompatible PHPUnit
82
- if : ${{ matrix.php_version == '8.0' || matrix.php_version == '8.1' || matrix.php_version == '8.2' || matrix.php_version == '8.3' }}
83
- run : composer update ${{ matrix.dependencies_level }} --ignore-platform-reqs --prefer-dist --no-interaction --no-progress
84
83
- name : Check composer.json
85
84
run : composer normalize --dry-run
86
85
- name : Run tests with coverage
87
- if : ${{ matrix.php_version != '8.0 ' && matrix.php_version != '8.1' && matrix.php_version != '8.2' && matrix.php_version != '8.3 ' }}
86
+ if : ${{ matrix.os != 'windows-latest ' && matrix.php_version == '8.1' && matrix.dependencies_level != '--prefer-lowest ' }}
88
87
run : php vendor/bin/phpunit --coverage-clover=coverage.xml
89
88
- name : Run tests
90
- if : ${{ matrix.php_version == '8.0' }}
91
89
run : vendor/bin/phpunit
92
- - name : Run tests
93
- if : ${{ matrix.php_version == '8.1' }}
94
- run : vendor/bin/phpunit --no-configuration --bootstrap=tests/bootstrap.php --dont-report-useless-tests vendor/squizlabs/php_codesniffer/tests/Standards/AllSniffs.php
95
90
- name : Run integration tests
96
91
run : vendor/bin/phpcs -s --standard=MO4 integrationtests/testfile.php
97
92
- name : Run PHPStan
0 commit comments