test: split unit and integration suites and add coverage config
- Create tests/Integration/ConnectionTest.php, skipped unless CAMELIA_TEST_HOST, CAMELIA_TEST_DATABASE and CAMELIA_TEST_USER are set, so composer test:integration no longer fails on a missing directory. - Move coverage reports to phpunit.coverage.xml.dist: a coverage driver is optional and failOnWarning would turn its absence into a failed gate. - Add a composer coverage script and document the requirement. - Exclude development-only files from the distribution archive via export-ignore. - Add a Gitea Actions workflow running composer check on PHP 8.3 and 8.4. - Align the README title with the package name and add Packagist and CI badges.
This commit is contained in:
1 parent
725bcfdaf4
commit
f9010e2c63
7 files changed
+144
-3
No files matched your search
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
Coverage configuration, kept out of phpunit.xml.dist on purpose: a coverage report
|
||||
needs Xdebug or PCOV, and `failOnWarning` turns the missing driver into a failed run.
|
||||
Invoke it explicitly with `composer coverage` on a machine that has a driver.
|
||||
-->
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
|
||||
bootstrap="vendor/autoload.php"
|
||||
colors="true"
|
||||
cacheDirectory=".phpunit.cache"
|
||||
failOnRisky="true"
|
||||
failOnEmptyTestSuite="true">
|
||||
<testsuites>
|
||||
<testsuite name="unit">
|
||||
<directory>tests/Unit</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<source>
|
||||
<include>
|
||||
<directory>src</directory>
|
||||
</include>
|
||||
</source>
|
||||
<coverage>
|
||||
<report>
|
||||
<text outputFile="php://stdout" showOnlySummary="true"/>
|
||||
<clover outputFile="coverage/clover.xml"/>
|
||||
<html outputDirectory="coverage/html"/>
|
||||
</report>
|
||||
</coverage>
|
||||
</phpunit>
|
||||
Reference in new issue
Block a user