File tree 5 files changed +56
-5
lines changed 5 files changed +56
-5
lines changed Original file line number Diff line number Diff line change 14
14
/.remarkignore export-ignore
15
15
/.remarkrc export-ignore
16
16
/phpunit.xml.dist export-ignore
17
+ /phpunit10.xml.dist export-ignore
17
18
/tests / export-ignore
18
19
19
20
#
Original file line number Diff line number Diff line change @@ -108,11 +108,18 @@ jobs:
108
108
# Bust the cache at least once a month - output format: YYYY-MM.
109
109
custom-cache-suffix : $(date -u "+%Y-%m")
110
110
111
- - name : Run the unit tests
112
- if : ${{ matrix.phpunit != '^10.0' }}
111
+ - name : Grab PHPUnit version
112
+ id : phpunit_version
113
+ run : echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> $GITHUB_OUTPUT
114
+
115
+ - name : " DEBUG: Show grabbed version"
116
+ run : echo ${{ steps.phpunit_version.outputs.VERSION }}
117
+
118
+ - name : " Run the unit tests (PHPUnit < 10)"
119
+ if : ${{ ! startsWith( steps.phpunit_version.outputs.VERSION, '10.' ) }}
113
120
run : composer test
114
121
115
- - name : Trial run the unit tests against PHPUnit 10.0
116
- if : ${{ matrix.phpunit == '^ 10.0' }}
122
+ - name : " Trial run the unit tests against PHPUnit 10.0"
123
+ if : ${{ startsWith( steps.phpunit_version.outputs.VERSION, ' 10.' ) }}
117
124
continue-on-error : true
118
- run : composer test
125
+ run : composer test10
Original file line number Diff line number Diff line change 5
5
/phpcs.xml
6
6
.cache /phpcs.cache
7
7
/phpunit.xml
8
+ /phpunit10.xml
8
9
/.phpunit.result.cache
9
10
/build /
Original file line number Diff line number Diff line change 68
68
],
69
69
"coverage" : [
70
70
" @php ./vendor/phpunit/phpunit/phpunit"
71
+ ],
72
+ "test10" : [
73
+ " @php ./vendor/phpunit/phpunit/phpunit -c phpunit10.xml.dist --no-coverage"
74
+ ],
75
+ "coverage10" : [
76
+ " @php ./vendor/phpunit/phpunit/phpunit -c phpunit10.xml.dist"
71
77
]
72
78
}
73
79
}
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2
+ <phpunit
3
+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4
+ xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/10.0/phpunit.xsd"
5
+ backupGlobals =" true"
6
+ bootstrap =" ./tests/bootstrap.php"
7
+ beStrictAboutOutputDuringTests =" true"
8
+ beStrictAboutTestsThatDoNotTestAnything =" true"
9
+ colors =" true"
10
+ cacheDirectory =" .cache/phpcs.cache"
11
+ requireCoverageMetadata =" true"
12
+ displayDetailsOnTestsThatTriggerErrors =" true"
13
+ displayDetailsOnTestsThatTriggerWarnings =" true"
14
+ displayDetailsOnTestsThatTriggerNotices =" true"
15
+ displayDetailsOnTestsThatTriggerDeprecations =" true"
16
+ >
17
+
18
+ <testsuites >
19
+ <testsuite name =" PHPUnitPolyfills" >
20
+ <directory suffix =" Test.php" >./tests/</directory >
21
+ </testsuite >
22
+ </testsuites >
23
+
24
+ <coverage includeUncoveredFiles =" true" >
25
+ <include >
26
+ <directory suffix =" .php" >./src/</directory >
27
+ </include >
28
+ <exclude >
29
+ <file >src/Polyfills/AssertClosedResource_Empty.php</file >
30
+ </exclude >
31
+ <report >
32
+ <clover outputFile =" build/logs/clover.xml" />
33
+ </report >
34
+ </coverage >
35
+
36
+ </phpunit >
You can’t perform that action at this time.
0 commit comments