JulienBreux / phpunit-docker

DEPRECATED :package: Docker image to use PHPUnit as CLI.
https://hub.docker.com/r/phpunit/phpunit/
MIT License
47 stars 28 forks source link

Running tests takes too long #74

Open HeathNaylor opened 6 years ago

HeathNaylor commented 6 years ago

When running from my local machine I return in ~5 seconds, when I run tests from the docker container it ends up taking ~3 minutes.

From docker run command:

docker run -v $(pwd):/app --rm phpunit/phpunit -c /app/phpunit.xml
PHPUnit 6.5.5 by Sebastian Bergmann, Julien Breux (Docker) and contributors.

Runtime:       PHP 7.1.12 with Xdebug 2.5.5
Configuration: /app/phpunit.xml

.......................................................           55 / 55 (100%)

Time: 2.65 minutes, Memory: 14.00MB

vs

$ vendor/bin/phpunit
PHPUnit 6.3.1 by Sebastian Bergmann and contributors.

Runtime:       PHP 7.0.25 with Xdebug 2.5.5
Configuration: ~/phpunit.xml

.......................................................           55 / 55 (100%)

Time: 5.15 seconds, Memory: 16.00MB
JulienBreux commented 6 years ago

Hi @HeathNaylor,

What's your OS?

Thx

rcwsr commented 6 years ago

Also having this issue, phpunit is around 5 times slower on docker (running on jenkins, centos 7).