How to configure circle.yml in order to call the database?

mysql
circle.yml

#1

I am trying to configure the CircleCi setup. When I try to run the tests in my own environment then everything works out, but when I try to run it in Circle CI, then I haave got this error.

PHPUnit 5.6.0 by Sebastian Bergmann and contributors.

IIIII.IIIIIIIIIIIIIIIIIIIIIIIIIIIIIFFFFFFFFFFFFIIII…IIIIIIIIIIII 65 / 89 ( 73%) IIIIIIIIIIIIIIIIIIIIIII. 89 / 89 (100%)

Time: 1.27 seconds, Memory: 56.00MB

There were 12 failures:

  1. App\Test\TestCase\Controller\TagsControllerTest::testStages exception ‘PDOException’ with message ‘SQLSTATE[HY000] [2002] No such file or directory’ in /home/ubuntu/cemcloud2/vendor/cakephp/cakephp/src/Database/Driver/PDODriverTrait.php:48

This is the first part of the error.

I am getting that I have an error with my database configuration. We are using Vagrant with the script (not sure if this is viable). Also we are using mariaDB 10.1.19 and I have built up a test database for PHPUnit to run the tests against. I don’t know how to add this database with the configuration of mariadb and specific database.

I know that I have to add the

database.yml.ci
to my config file so I have added it in there and it looks like this.
test: adapter: mysql database: cemcloudTest username: root password: ''
Also I have added the circle.yml to our project root and it looks like this.
`
machine:
php:
version: 7.0
mysql:
version: 10.1.19
database:
override:

  • cp config/database.yml.ci config/database.yml
  • bundle exec rake db:create db:schema:load`
    Could someone help me out ?

#2