Hello everyone, I can’t make my phpunit coverage & logs available in my artifacts, and can’t even send my coverage to CodeCov.io…
Here’s my circle.yml
file: https://gist.github.com/Pierstoval/51c1c81c35b95d3d32aa2584737c0eda
First, even if I have set up the cache for composer, I can’t make it work and composer packages are always downloaded, whatever the cache I try to configure…
The tests/ci/ci.bash
is just a bash script that uses environment vars as parameters. It also runs lots of stuff before using phpunit (composer install, check environment configuration, etc.).
The final PHPUnit command looks like this when resolved:
./vendor/bin/phpunit \
--log-junit "/home/ubuntu/my_project/build/phpunit/junit.xml" \
--coverage-clover "/home/ubuntu/my_project/build/phpunit/clover.xml" \
--coverage-html "/home/ubuntu/my_project/build/phpunit/html/
The problem is that none of these files exist in the end.
I tried adding test -f "${PROJECT_DIR}/build/phpunit/clover.xml"
in the circle.yml
file and I have these results:
$ test -f "${PROJECT_DIR}/build/phpunit/clover.xml"
test -f "${PROJECT_DIR}/build/phpunit/clover.xml" returned exit code 1
BUT, in the PHPUnit’s output I see this:
Generating code coverage report in Clover XML format ... done
Generating code coverage report in HTML format ... done
Any idea on why PHPUnit does not generate coverage or logs?
May I have done something wrong?
Edit:
I relaunched the build with SSH enabled, and when I log with ssh, go to the project’s directory and run the exact same phpunit command, the coverage is dumped to the directories.
Whereas it is not when running the build “normally”…
What’s the problem?