I just installed the Codebuild pipeline for testing PHP Symfony2 on phpunit.
Situation:
Some of our tests speak with a local database (classic mysql server)
Codebuild uses our custom Docker image based on php:5.6-apache
OS : Linux Alpine PHP VERSION : 5.6
We perform the following steps:
- Extract sources
- Database setup (all inactivity).
- Composer Installation ( 5 minutes )
php app/console doctrine:schema:update --forcephp app/console broadway:event-store:schema:init- Run phpUnit.
In the local environment (Docker with a resolution of 6 GB of RAM), it is still okey.
The whole process takes like 15 minutes ... perfect.
Problem:
When I run assembly on the same image in AWS-CodeBuild , this is a lot more:
- Extract Sources ( Instant )
- Database Setup ( Instant )
- Composer Installation ( 5 minutes )
php app/console doctrine:schema:update --force ( 14 minutes )php app/console broadway:event-store:schema:init ( Instant )- phpUnit ( Infinity CodeBuild Timeout)
Hypothesis:
It seems that the whole php process provides access to the database very slowly.
Classic MySQL queries have a "normal" speed ...
If someone got an idea?
thank you for your help
@ Rops42
source share