File tree Expand file tree Collapse file tree 6 files changed +32
-9
lines changed Expand file tree Collapse file tree 6 files changed +32
-9
lines changed Original file line number Diff line number Diff line change 5050 - name : WordPress unit test
5151 run : yarn php:unit
5252
53+ - name : Unit test coverage report
54+ uses : codecov/codecov-action@v4
55+ with :
56+ files : ./unit-coverage.xml
57+ flags : unittests
58+ token : ${{ secrets.CODECOV_TOKEN }}
59+
5360 - name : WordPress integration test
5461 run : yarn php:integration
5562
63+ - name : Integration test coverage report
64+ uses : codecov/codecov-action@v4
65+ with :
66+ files : ./integration-coverage.xml
67+ flags : integrationtests
68+ token : ${{ secrets.CODECOV_TOKEN }}
69+
5670 - name : WordPress integration test as multisite
5771 run : yarn php:multisite
5872
Original file line number Diff line number Diff line change 33build
44yarn-error.log
55.phpunit.result.cache
6+ .phpunit.cache
67.DS_Store
78testingdb
89.env
@@ -14,3 +15,5 @@ tests-examples/
1415/blob-report /
1516/playwright /.cache /
1617build-script.sh
18+ integration-coverage.xml
19+ unit-coverage.xml
Original file line number Diff line number Diff line change 4141 "phpmd" : " phpmd plugin.php,includes text phpmd.xml.dist --color" ,
4242 "phpstan" : " phpstan analyse --memory-limit=2048M" ,
4343 "phpstan-baseline" : " phpstan analyse -b --allow-empty-baseline --memory-limit=2048M" ,
44- "test:integration" : " phpunit --dont-report-useless-tests --configuration ./phpunit-integration.xml --testsuite integration --testdox --coverage-text " ,
45- "test:multisite" : " phpunit --dont-report-useless-tests --configuration ./phpunit-integration-multisite.xml --testsuite integration --testdox --coverage-text " ,
46- "test:unit" : " phpunit --dont-report-useless-tests --configuration ./phpunit.xml --testsuite unit --testdox --coverage-text "
44+ "test:integration" : " phpunit --dont-report-useless-tests --configuration ./phpunit-integration.xml --testsuite integration --testdox" ,
45+ "test:multisite" : " phpunit --dont-report-useless-tests --configuration ./phpunit-integration-multisite.xml --testsuite integration --testdox " ,
46+ "test:unit" : " phpunit --dont-report-useless-tests --configuration ./phpunit.xml --testsuite unit --testdox"
4747 }
4848}
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
2- <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" bootstrap =" tests/integration/bootstrap.php" backupGlobals =" false" colors =" true" convertErrorsToExceptions =" true" convertNoticesToExceptions =" true" convertWarningsToExceptions =" true" xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
3- <coverage processUncoveredFiles = " true " >
2+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" bootstrap =" tests/integration/bootstrap.php" backupGlobals =" false" colors =" true" convertErrorsToExceptions =" true" convertNoticesToExceptions =" true" convertWarningsToExceptions =" true" cacheResultFile = " .phpunit.cache/test-results " xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
3+ <coverage cacheDirectory = " .phpunit.cache/code-coverage " >
44 <include >
55 <directory suffix =" .php" >./includes</directory >
66 </include >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
2- <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" bootstrap =" tests/integration/bootstrap.php" backupGlobals =" false" colors =" true" convertErrorsToExceptions =" true" convertNoticesToExceptions =" true" convertWarningsToExceptions =" true" xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
3- <coverage processUncoveredFiles = " true " >
2+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" bootstrap =" tests/integration/bootstrap.php" backupGlobals =" false" colors =" true" convertErrorsToExceptions =" true" convertNoticesToExceptions =" true" convertWarningsToExceptions =" true" cacheResultFile = " .phpunit.cache/test-results " xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
3+ <coverage cacheDirectory = " .phpunit.cache/code-coverage " >
44 <include >
55 <directory suffix =" .php" >./includes</directory >
66 </include >
7+ <report >
8+ <clover outputFile =" integration-coverage.xml" />
9+ </report >
710 </coverage >
811 <testsuites >
912 <testsuite name =" integration" >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" ?>
2- <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" bootstrap =" tests/unit/bootstrap.php" backupGlobals =" false" colors =" true" convertErrorsToExceptions =" true" convertNoticesToExceptions =" true" convertWarningsToExceptions =" true" failOnRisky =" true" xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
3- <coverage processUncoveredFiles = " true " >
2+ <phpunit xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" bootstrap =" tests/unit/bootstrap.php" backupGlobals =" false" colors =" true" convertErrorsToExceptions =" true" convertNoticesToExceptions =" true" convertWarningsToExceptions =" true" failOnRisky =" true" cacheResultFile = " .phpunit.cache/test-results " xsi : noNamespaceSchemaLocation =" https://schema.phpunit.de/9.3/phpunit.xsd" >
3+ <coverage cacheDirectory = " .phpunit.cache/code-coverage " >
44 <include >
55 <directory suffix =" .php" >./includes</directory >
66 </include >
7+ <report >
8+ <clover outputFile =" unit-coverage.xml" />
9+ </report >
710 </coverage >
811 <testsuites >
912 <testsuite name =" unit" >
You can’t perform that action at this time.
0 commit comments