File tree 10 files changed +52
-81
lines changed
10 files changed +52
-81
lines changed Original file line number Diff line number Diff line change @@ -32,15 +32,13 @@ jobs:
32
32
33
33
- name : Run test suite
34
34
run : |
35
- mkdir -p ./coverage/php-${{ matrix.php-version }}
36
- ./vendor/bin/phpunit --configuration ./phpunit-${{ matrix.php-version }}.xml --coverage-clover ./coverage/php-${{ matrix.php-version }}/coverage.clover --coverage-html ./coverage/php-${{ matrix.php-version }}/html/
37
-
38
- - name : Get current date/time
39
- id : date
40
- run : echo "::set-output name=date::$(date +'%Y%m%d-%H%M')"
35
+ mkdir ./coverage
36
+ php -v > ./coverage/php${{ matrix.php-version }}_output.txt && echo '' >> ./coverage/php${{ matrix.php-version }}_output.txt
37
+ ./vendor/bin/phpunit --configuration ./tests/phpunit-${{ matrix.php-version }}.xml --coverage-clover ./coverage/php${{ matrix.php-version }}_coverage.clover >> ./coverage/php${{ matrix.php-version }}_output.txt
38
+ cat ./coverage/php${{ matrix.php-version }}_output.txt
41
39
42
40
- name : Save coverage results
43
41
uses : actions/upload-artifact@v3
44
42
with :
45
- name : coverage_php -array-to-xml_${{ steps.date.outputs.date }}
43
+ name : coverage_clover_php -array-to-xml
46
44
path : ./coverage
Original file line number Diff line number Diff line change @@ -456,3 +456,15 @@ Result (prettified):
456
456
<RealNull >__NULL__</RealNull >
457
457
</root >
458
458
```
459
+
460
+ # PHPUnit Tests
461
+ Use a specific configuration file, depending on your php version:
462
+ ```
463
+ ./vendor/bin/phpunit --configuration ./tests/phpunit-7.0.xml
464
+ ./vendor/bin/phpunit --configuration ./tests/phpunit-7.1.xml
465
+ ./vendor/bin/phpunit --configuration ./tests/phpunit-7.2.xml
466
+ ./vendor/bin/phpunit --configuration ./tests/phpunit-7.3.xml
467
+ ./vendor/bin/phpunit --configuration ./tests/phpunit-7.4.xml
468
+ ./vendor/bin/phpunit --configuration ./tests/phpunit-8.0.xml
469
+ ./vendor/bin/phpunit --configuration ./tests/phpunit-8.1.xml
470
+ ```
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2
2
<!-- PHPUnit 6 PHP 7.0 - PHP 7.2 (https://phpunit.de/supported-versions.html) -->
3
3
<phpunit backupGlobals =" false"
4
4
backupStaticAttributes =" false"
5
- bootstrap =" vendor/autoload.php"
5
+ bootstrap =" ./../ vendor/autoload.php"
6
6
colors =" true"
7
7
convertErrorsToExceptions =" true"
8
8
convertNoticesToExceptions =" true"
9
9
convertWarningsToExceptions =" true"
10
10
processIsolation =" false"
11
11
stopOnFailure =" false"
12
12
syntaxCheck =" false" >
13
-
14
13
<filter >
15
14
<whitelist >
16
- <directory >./src</directory >
15
+ <directory >./../ src</directory >
17
16
<exclude >
18
- <directory >./vendor</directory >
19
- <directory >./tests</directory >
17
+ <directory >./../ vendor</directory >
18
+ <directory >./../ tests</directory >
20
19
</exclude >
21
20
</whitelist >
22
21
</filter >
23
-
24
22
<testsuites >
25
23
<testsuite name =" PhpArrayToXml Test Suite" >
26
- <directory >./tests/</directory >
24
+ <directory >./../ tests/</directory >
27
25
</testsuite >
28
26
</testsuites >
29
-
30
27
</phpunit >
Original file line number Diff line number Diff line change 2
2
<!-- PHPUnit 7 PHP 7.1 - PHP 7.3 (https://phpunit.de/supported-versions.html) -->
3
3
<phpunit backupGlobals =" false"
4
4
backupStaticAttributes =" false"
5
- bootstrap =" vendor/autoload.php"
5
+ bootstrap =" ./../ vendor/autoload.php"
6
6
colors =" true"
7
7
convertErrorsToExceptions =" true"
8
8
convertNoticesToExceptions =" true"
9
9
convertWarningsToExceptions =" true"
10
10
processIsolation =" false"
11
11
stopOnFailure =" false" >
12
-
13
12
<filter >
14
13
<whitelist >
15
- <directory >./src</directory >
14
+ <directory >./../ src</directory >
16
15
<exclude >
17
- <directory >./vendor</directory >
18
- <directory >./tests</directory >
16
+ <directory >./../ vendor</directory >
17
+ <directory >./../ tests</directory >
19
18
</exclude >
20
19
</whitelist >
21
20
</filter >
22
-
23
21
<testsuites >
24
22
<testsuite name =" PhpArrayToXml Test Suite" >
25
- <directory >./tests/</directory >
23
+ <directory >./../ tests/</directory >
26
24
</testsuite >
27
25
</testsuites >
28
-
29
26
</phpunit >
Original file line number Diff line number Diff line change 2
2
<!-- PHPUnit 8 >= PHP 7.2 (https://phpunit.de/supported-versions.html) -->
3
3
<phpunit backupGlobals =" false"
4
4
backupStaticAttributes =" false"
5
- bootstrap =" vendor/autoload.php"
5
+ bootstrap =" ./../ vendor/autoload.php"
6
6
colors =" true"
7
7
convertErrorsToExceptions =" true"
8
8
convertNoticesToExceptions =" true"
9
9
convertWarningsToExceptions =" true"
10
10
processIsolation =" false"
11
11
stopOnFailure =" false" >
12
-
13
12
<filter >
14
13
<whitelist >
15
- <directory >./src</directory >
14
+ <directory >./../ src</directory >
16
15
<exclude >
17
- <directory >./vendor</directory >
18
- <directory >./tests</directory >
16
+ <directory >./../ vendor</directory >
17
+ <directory >./../ tests</directory >
19
18
</exclude >
20
19
</whitelist >
21
20
</filter >
22
-
23
21
<testsuites >
24
22
<testsuite name =" PhpArrayToXml Test Suite" >
25
- <directory >./tests/</directory >
23
+ <directory >./../ tests/</directory >
26
24
</testsuite >
27
25
</testsuites >
28
-
29
26
</phpunit >
Original file line number Diff line number Diff line change 4
4
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
5
backupGlobals =" false"
6
6
backupStaticAttributes =" false"
7
- bootstrap =" vendor/autoload.php"
7
+ bootstrap =" ./../ vendor/autoload.php"
8
8
colors =" true"
9
9
convertErrorsToExceptions =" true"
10
10
convertNoticesToExceptions =" true"
15
15
xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
16
16
<coverage >
17
17
<include >
18
- <directory >./src</directory >
18
+ <directory >./../ src</directory >
19
19
</include >
20
20
<exclude >
21
- <directory >./vendor</directory >
22
- <directory >./tests</directory >
21
+ <directory >./../ vendor</directory >
22
+ <directory >./../ tests</directory >
23
23
</exclude >
24
24
</coverage >
25
25
<testsuites >
26
26
<testsuite name =" PhpArrayToXml Test Suite" >
27
- <directory >./tests/</directory >
27
+ <directory >./../ tests/</directory >
28
28
</testsuite >
29
29
</testsuites >
30
30
</phpunit >
Original file line number Diff line number Diff line change 4
4
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
5
backupGlobals =" false"
6
6
backupStaticAttributes =" false"
7
- bootstrap =" vendor/autoload.php"
7
+ bootstrap =" ./../ vendor/autoload.php"
8
8
colors =" true"
9
9
convertErrorsToExceptions =" true"
10
10
convertNoticesToExceptions =" true"
15
15
xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
16
16
<coverage >
17
17
<include >
18
- <directory >./src</directory >
18
+ <directory >./../ src</directory >
19
19
</include >
20
20
<exclude >
21
- <directory >./vendor</directory >
22
- <directory >./tests</directory >
21
+ <directory >./../ vendor</directory >
22
+ <directory >./../ tests</directory >
23
23
</exclude >
24
24
</coverage >
25
25
<testsuites >
26
26
<testsuite name =" PhpArrayToXml Test Suite" >
27
- <directory >./tests/</directory >
27
+ <directory >./../ tests/</directory >
28
28
</testsuite >
29
29
</testsuites >
30
30
</phpunit >
Original file line number Diff line number Diff line change 4
4
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
5
backupGlobals =" false"
6
6
backupStaticAttributes =" false"
7
- bootstrap =" vendor/autoload.php"
7
+ bootstrap =" ./../ vendor/autoload.php"
8
8
colors =" true"
9
9
convertErrorsToExceptions =" true"
10
10
convertNoticesToExceptions =" true"
15
15
xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
16
16
<coverage >
17
17
<include >
18
- <directory >./src</directory >
18
+ <directory >./../ src</directory >
19
19
</include >
20
20
<exclude >
21
- <directory >./vendor</directory >
22
- <directory >./tests</directory >
21
+ <directory >./../ vendor</directory >
22
+ <directory >./../ tests</directory >
23
23
</exclude >
24
24
</coverage >
25
25
<testsuites >
26
26
<testsuite name =" PhpArrayToXml Test Suite" >
27
- <directory >./tests/</directory >
27
+ <directory >./../ tests/</directory >
28
28
</testsuite >
29
29
</testsuites >
30
30
</phpunit >
Original file line number Diff line number Diff line change 4
4
xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
5
5
backupGlobals =" false"
6
6
backupStaticAttributes =" false"
7
- bootstrap =" vendor/autoload.php"
7
+ bootstrap =" ./../ vendor/autoload.php"
8
8
colors =" true"
9
9
convertErrorsToExceptions =" true"
10
10
convertNoticesToExceptions =" true"
15
15
xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
16
16
<coverage >
17
17
<include >
18
- <directory >./src</directory >
18
+ <directory >./../ src</directory >
19
19
</include >
20
20
<exclude >
21
- <directory >./vendor</directory >
22
- <directory >./tests</directory >
21
+ <directory >./../ vendor</directory >
22
+ <directory >./../ tests</directory >
23
23
</exclude >
24
24
</coverage >
25
25
<testsuites >
26
26
<testsuite name =" PhpArrayToXml Test Suite" >
27
- <directory >./tests/</directory >
27
+ <directory >./../ tests/</directory >
28
28
</testsuite >
29
29
</testsuites >
30
30
</phpunit >
You can’t perform that action at this time.
0 commit comments