What the green check actually proves
composer check runs phpcs, then phpstan level 5, then phpunit. The first two
pass on their own merits. The third does this:
PHPUnit 10.5.64 by Sebastian Bergmann and contributors.
Runtime: PHP 8.1.34 with Xdebug 3.5.3
Configuration: /home/runner/work/taskflow-pro/taskflow-pro/phpunit.xml.dist
No tests executed!
Code Coverage Report:
Summary:
Classes: 0.00% (0/69)
Methods: 0.00% (0/379)
Lines: 0.00% (0/1168)
tests/ exists and is empty. PHPUnit exits 0 when a suite is empty, so the
job goes green.
The CI badge therefore says nothing about whether this code works. It says
the code is formatted and type-consistent. 1168 lines across 69 classes have
never been executed by a test.
Why it stays invisible
phpunit.xml.dist is deliberately strict — it sets failOnRisky="true" and
failOnWarning="true" — but not failOnEmptyTestSuite. It guards every
outcome except the one that is actually happening.
Two parts, in order
1. Make the gate honest. Add to phpunit.xml.dist:
failOnEmptyTestSuite="true"
Doing this alone turns CI red immediately, which is the accurate state — so it
should land together with, or just after, the first real test.
2. Start the suite where it is worth most. The domain layer is the part
this project's README claims is free of framework and persistence concerns,
which is exactly the part that is cheap to test and most embarrassing to have
wrong. A handful of tests over the entities and use cases in app/ buys more
than broad shallow coverage.
Good first issue
Picking one class in app/, writing two or three tests for its real behaviour,
and flipping failOnEmptyTestSuite is a self-contained contribution that
leaves the repository measurably more trustworthy than it was.
What the green check actually proves
composer checkruns phpcs, then phpstan level 5, then phpunit. The first twopass on their own merits. The third does this:
tests/exists and is empty. PHPUnit exits 0 when a suite is empty, so thejob goes green.
The CI badge therefore says nothing about whether this code works. It says
the code is formatted and type-consistent. 1168 lines across 69 classes have
never been executed by a test.
Why it stays invisible
phpunit.xml.distis deliberately strict — it setsfailOnRisky="true"andfailOnWarning="true"— but notfailOnEmptyTestSuite. It guards everyoutcome except the one that is actually happening.
Two parts, in order
1. Make the gate honest. Add to
phpunit.xml.dist:Doing this alone turns CI red immediately, which is the accurate state — so it
should land together with, or just after, the first real test.
2. Start the suite where it is worth most. The domain layer is the part
this project's README claims is free of framework and persistence concerns,
which is exactly the part that is cheap to test and most embarrassing to have
wrong. A handful of tests over the entities and use cases in
app/buys morethan broad shallow coverage.
Good first issue
Picking one class in
app/, writing two or three tests for its real behaviour,and flipping
failOnEmptyTestSuiteis a self-contained contribution thatleaves the repository measurably more trustworthy than it was.