updating ci

This commit is contained in:
Joby Elliott 2018-08-18 09:59:30 -06:00
parent 82586899e3
commit e8ccd91012
3 changed files with 9 additions and 8 deletions

View file

@ -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
- vendor/bin/phpunit --configuration phpunit.xml --coverage-text --colors=never

View file

@ -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';

View file

@ -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;
}