mirror of
https://github.com/shlinkio/shlink.git
synced 2024-11-27 08:18:24 +03:00
Replaced localhost name by 127.0.0.1 for databases when in travis
This commit is contained in:
parent
840e377245
commit
a22beeed08
2 changed files with 4 additions and 4 deletions
|
@ -26,9 +26,9 @@ install:
|
|||
before_script:
|
||||
- mysql -e 'CREATE DATABASE shlink_test;'
|
||||
- psql -c 'create database shlink_test;' -U postgres
|
||||
- mkdir build
|
||||
|
||||
script:
|
||||
- mkdir build
|
||||
- composer ci
|
||||
|
||||
after_success:
|
||||
|
|
|
@ -17,7 +17,7 @@ $swooleTestingPort = 9999;
|
|||
|
||||
$buildDbConnection = function () {
|
||||
$driver = env('DB_DRIVER', 'sqlite');
|
||||
$isCi = env('TRAVIS') === 'true';
|
||||
$isCi = env('TRAVIS', false);
|
||||
|
||||
switch ($driver) {
|
||||
case 'sqlite':
|
||||
|
@ -28,7 +28,7 @@ $buildDbConnection = function () {
|
|||
case 'mysql':
|
||||
return [
|
||||
'driver' => 'pdo_mysql',
|
||||
'host' => $isCi ? 'localhost' : 'shlink_db',
|
||||
'host' => $isCi ? '127.0.0.1' : 'shlink_db',
|
||||
'user' => 'root',
|
||||
'password' => $isCi ? '' : 'root',
|
||||
'dbname' => 'shlink_test',
|
||||
|
@ -40,7 +40,7 @@ $buildDbConnection = function () {
|
|||
case 'postgres':
|
||||
return [
|
||||
'driver' => 'pdo_pgsql',
|
||||
'host' => $isCi ? 'localhost' : 'shlink_db_postgres',
|
||||
'host' => $isCi ? '127.0.0.1' : 'shlink_db_postgres',
|
||||
'user' => 'postgres',
|
||||
'password' => $isCi ? '' : 'root',
|
||||
'dbname' => 'shlink_test',
|
||||
|
|
Loading…
Reference in a new issue