21
21
runs-on : ubuntu-latest
22
22
strategy :
23
23
matrix :
24
- php : [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '8.0 ', '8.1 ', '8.2 ', '8.3 ', '8.4' ]
24
+ php : [ '5.5', '5.6', '7.0', '7.1', '7.2', '7.3', '7.4 ', '8.0 ', '8.1 ', '8.2 ', '8.4' ]
25
25
phpcs_version : [ 'lowest', 'dev-master' ]
26
26
extensions : [ '' ]
27
27
coverage : [false]
33
33
coverage : true # Make sure coverage is recorded for this too.
34
34
35
35
# Run code coverage builds against high/low PHP and high/low PHPCS.
36
- # Note: Until PHPCS supports PHPUnit 9, we cannot run code coverage on PHP 8.0+.
37
36
- php : ' 5.4'
38
37
phpcs_version : ' dev-master'
39
38
extensions : ' '
@@ -42,11 +41,11 @@ jobs:
42
41
phpcs_version : ' lowest'
43
42
extensions : ' '
44
43
coverage : true
45
- - php : ' 7.4 '
44
+ - php : ' 8.3 '
46
45
phpcs_version : ' dev-master'
47
46
extensions : ' '
48
47
coverage : true
49
- - php : ' 7.4 '
48
+ - php : ' 8.3 '
50
49
phpcs_version : ' lowest'
51
50
extensions : ' '
52
51
coverage : true
@@ -86,20 +85,12 @@ jobs:
86
85
if : ${{ matrix.phpcs_version != 'lowest' }}
87
86
run : composer require squizlabs/php_codesniffer:"${{ matrix.phpcs_version }}" --no-update --no-scripts --no-interaction
88
87
89
- - name : Install Composer dependencies (PHP < 8.0 )
90
- if : ${{ matrix.php < 8.0 }}
88
+ - name : Install Composer dependencies
91
89
uses : ramsey/composer-install@v2
92
90
with :
93
91
# Bust the cache at least once a month - output format: YYYY-MM.
94
92
custom-cache-suffix : $(date -u "+%Y-%m")
95
93
96
- - name : Install Composer dependencies (PHP >= 8.0)
97
- if : ${{ matrix.php >= 8.0 }}
98
- uses : ramsey/composer-install@v2
99
- with :
100
- composer-options : --ignore-platform-req=php+
101
- custom-cache-suffix : $(date -u "+%Y-%m")
102
-
103
94
- name : " Set PHPCS version (lowest)"
104
95
if : ${{ matrix.phpcs_version == 'lowest' }}
105
96
run : composer update squizlabs/php_codesniffer --prefer-lowest --ignore-platform-req=php+ --no-scripts --no-interaction
@@ -108,19 +99,14 @@ jobs:
108
99
if : ${{ matrix.phpcs_version == 'dev-master' }}
109
100
run : composer lint -- --checkstyle | cs2pr
110
101
111
- - name : Run the unit tests without code coverage - PHP 5.4 - 8.0
112
- if : ${{ matrix.php < '8.1' && matrix. coverage == false }}
102
+ - name : Run the unit tests without code coverage
103
+ if : ${{ matrix.coverage == false }}
113
104
run : composer run-tests
114
105
115
- - name : Run the unit tests with code coverage - PHP 5.4 - 8.0
116
- if : ${{ matrix.php < '8.1' && matrix. coverage == true }}
106
+ - name : Run the unit tests with code coverage
107
+ if : ${{ matrix.coverage == true }}
117
108
run : composer coverage
118
109
119
- # Until PHPCS supports PHPUnit 9, we cannot run code coverage on PHP 8.0+.
120
- - name : Run the unit tests without code coverage - PHP >= 8.1
121
- if : ${{ matrix.php >= '8.1' && matrix.coverage == false }}
122
- run : composer run-tests -- --no-configuration --bootstrap=./Tests/bootstrap.php --dont-report-useless-tests
123
-
124
110
- name : Send coverage report to Codecov
125
111
if : ${{ success() && matrix.coverage == true }}
126
112
uses : codecov/codecov-action@v3
0 commit comments