File tree Expand file tree Collapse file tree 2 files changed +51
-4
lines changed Expand file tree Collapse file tree 2 files changed +51
-4
lines changed Original file line number Diff line number Diff line change @@ -131,11 +131,21 @@ jobs:
131
131
- name : Composer info
132
132
run : composer info
133
133
134
- - name : Grab PHPCS version
135
- id : phpcs_version
136
- run : echo "VERSION=$(vendor/bin/phpcs --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> "$GITHUB_OUTPUT"
134
+ - name : Grab PHPUnit version
135
+ id : phpunit_version
136
+ run : echo "VERSION=$(vendor/bin/phpunit --version | grep --only-matching --max-count=1 --extended-regexp '\b[0-9]+\.[0-9]+')" >> "$GITHUB_OUTPUT"
137
+
138
+ - name : Determine PHPUnit config file to use
139
+ id : phpunit_config
140
+ shell : bash
141
+ run : |
142
+ if [ "${{ startsWith( steps.phpunit_version.outputs.VERSION, '11.' ) }}" == "true" ]; then
143
+ echo 'FILE=phpunit.xml' >> "$GITHUB_OUTPUT"
144
+ else
145
+ echo 'FILE=phpunit-lte9.xml' >> "$GITHUB_OUTPUT"
146
+ fi
137
147
138
148
- name : Run the unit tests
139
- run : composer test
149
+ run : composer test -- -c ${{ steps.phpunit_config.outputs.FILE }}
140
150
env :
141
151
PHPCS_VERSION : ${{ matrix.phpcs_version }}
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/9.2/phpunit.xsd"
5
+ backupGlobals =" true"
6
+ beStrictAboutOutputDuringTests =" true"
7
+ beStrictAboutTestsThatDoNotTestAnything =" false"
8
+ bootstrap =" ./vendor/squizlabs/php_codesniffer/tests/bootstrap.php"
9
+ convertErrorsToExceptions =" true"
10
+ convertWarningsToExceptions =" true"
11
+ convertNoticesToExceptions =" true"
12
+ convertDeprecationsToExceptions =" true"
13
+ forceCoversAnnotation =" true"
14
+ >
15
+ <testsuites >
16
+ <testsuite name =" yCodeTech_Sniffs" >
17
+ <directory >./yCodeTech/Tests/</directory >
18
+ </testsuite >
19
+ </testsuites >
20
+
21
+ <groups >
22
+ <exclude >
23
+ <group >CBF</group >
24
+ </exclude >
25
+ </groups >
26
+
27
+ <filter >
28
+ <whitelist addUncoveredFilesFromWhitelist =" true" processUncoveredFilesFromWhitelist =" false" >
29
+ <directory suffix =" .php" >./yCodeTech/</directory >
30
+ </whitelist >
31
+ </filter >
32
+
33
+ <logging >
34
+ <log type =" coverage-text" target =" php://stdout" showOnlySummary =" true" />
35
+ <log type =" coverage-clover" target =" build/logs/clover.xml" />
36
+ </logging >
37
+ </phpunit >
You can’t perform that action at this time.
0 commit comments