diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ad3bc2e..f54a8da 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,6 +1,6 @@ # This file is a template, and might need editing before it works on your project. # Select image from https://hub.docker.com/_/php/ -image: php:7.1.1 +image: php:7.1.1 # Select what we should cache between builds cache: @@ -12,6 +12,7 @@ before_script: - apt-get install -yqq git libmcrypt-dev libpq-dev libcurl4-gnutls-dev libicu-dev libvpx-dev libjpeg-dev libpng-dev libxpm-dev zlib1g-dev libfreetype6-dev libxml2-dev libexpat1-dev libbz2-dev libgmp3-dev libldap2-dev unixodbc-dev libsqlite3-dev libaspell-dev libsnmp-dev libpcre3-dev libtidy-dev # Install PHP extensions - docker-php-ext-install mbstring mcrypt pdo_pgsql curl json intl gd xml zip bz2 opcache +- docker-php-ext-enable pdo_sqlite pdo_mysql # Install & enable Xdebug for code coverage reports - pecl install xdebug - docker-php-ext-enable xdebug @@ -27,11 +28,11 @@ services: # Set any variables we need variables: # Configure mysql environment variables (https://hub.docker.com/r/_/mysql/) - MYSQL_DATABASE: mysql_database - MYSQL_ROOT_PASSWORD: mysql_strong_password + MYSQL_DATABASE: ci + MYSQL_ROOT_PASSWORD: ci_password # Run our tests # If Xdebug was installed you can generate a coverage report and see code coverage metrics. test: script: - - vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never \ No newline at end of file + - vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never diff --git a/tests/Drivers/IntegrationTests/MySQLDriverIntegrationTest.php b/tests/Drivers/IntegrationTests/MySQLDriverIntegrationTest.php index 3179284..cefa529 100644 --- a/tests/Drivers/IntegrationTests/MySQLDriverIntegrationTest.php +++ b/tests/Drivers/IntegrationTests/MySQLDriverIntegrationTest.php @@ -8,8 +8,8 @@ use PHPUnit\Framework\TestCase; class MySQLDriverTest extends AbstractDriverIntegrationTest { const DRIVER_CLASS = \Destructr\Drivers\MySQLDriver::class; - const DRIVER_DSN = 'mysql:host=127.0.0.1;dbname=phpunit'; - const DRIVER_USERNAME = 'travis'; + const DRIVER_DSN = 'mysql:host=mysql;dbname=ci'; + const DRIVER_USERNAME = 'ci_password'; const DRIVER_PASSWORD = null; const DRIVER_OPTIONS = null; const TEST_TABLE = 'mysqlintegrationtest'; diff --git a/tests/Drivers/MySQLDriverTest.php b/tests/Drivers/MySQLDriverTest.php index 617674a..52885dd 100644 --- a/tests/Drivers/MySQLDriverTest.php +++ b/tests/Drivers/MySQLDriverTest.php @@ -8,8 +8,8 @@ use PHPUnit\Framework\TestCase; class MySQLDriverTest extends AbstractDriverTest { const DRIVER_CLASS = MySQLDriver::class; - const DRIVER_DSN = 'mysql:host=127.0.0.1;dbname=phpunit'; - const DRIVER_USERNAME = 'travis'; + const DRIVER_DSN = 'mysql:host=mysql;dbname=ci'; + const DRIVER_USERNAME = 'ci_password'; const DRIVER_PASSWORD = null; const DRIVER_OPTIONS = null; }