1
- name : PHPUnit
1
+ name : " Continuous Integration "
2
2
3
3
on :
4
4
push :
5
- branches : [ main ]
5
+ paths-ignore :
6
+ - ' doc/**'
6
7
pull_request :
7
- branches : [ main ]
8
+ paths-ignore :
9
+ - ' doc/**'
8
10
9
11
jobs :
10
- test :
11
- name : PHP ${{ matrix.php_version }}
12
+ tests :
13
+ name : PHP ${{ matrix.php-version }}
14
+
12
15
runs-on : ubuntu-latest
13
16
continue-on-error : ${{ matrix.experimental }}
17
+
14
18
strategy :
15
19
fail-fast : false
16
20
matrix :
17
- php_version : ['7.4', '8.0', '8.1']
18
- composer_flags : ['--ignore-platform-reqs', '']
21
+ php-version :
22
+ - " 7.4"
23
+ - " 8.0"
19
24
experimental : [false]
20
25
include :
21
- - php_version : ' 8.1'
26
+ - php-version : " 8.1"
22
27
experimental : true
23
28
24
29
steps :
27
32
- name : Setup PHP with PECL extension
28
33
uses :
shivammathur/[email protected]
29
34
with :
30
- php-version : ${{ matrix.php_version }}
35
+ php-version : ${{ matrix.php-version }}
31
36
tools : composer:v2
32
37
coverage : pcov
33
38
@@ -42,12 +47,21 @@ jobs:
42
47
43
48
with :
44
49
path : ${{ steps.composer-cache.outputs.dir }}
45
- key : ${{ runner.os }}-php-${{ matrix.php_version }}-${{ hashFiles('**/composer.lock') }}
46
- restore-keys : ${{ runner.os }}-php-${{ matrix.php_version }}-
50
+ key : ${{ runner.os }}-php-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
51
+ restore-keys : ${{ runner.os }}-php-${{ matrix.php-version }}-
47
52
48
53
- name : Install dependencies
49
54
if : steps.composer-cache.outputs.cache-hit != 'true'
50
- run : composer install ${{ matrix.composer_flags }} --prefer-dist --no-progress --optimize-autoloader --no-interaction
55
+ run : composer install --prefer-dist --no-progress --optimize-autoloader --no-interaction
51
56
52
57
- name : Run PHPUnit test suite
53
- run : composer run-script phpunit
58
+ run : composer run-script test-ci
59
+
60
+ - name : Publish code coverage
61
+
62
+ env :
63
+ CC_TEST_REPORTER_ID : ${{ secrets.CC_TEST_REPORTER_ID }}
64
+ with :
65
+ coverageCommand : composer run-script test-coverage
66
+ coverageLocations : |
67
+ ${{github.workspace}}/clover.xml:clover
0 commit comments