Update travis config to properly select environment
This commit is contained in:
parent
b3c0e6ac6b
commit
27ed3ee040
@ -9,8 +9,8 @@ install:
|
|||||||
- composer install
|
- composer install
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- DB=mysql, ENVIRONMENT=testing-mysql
|
- DB=mysql
|
||||||
- DB=pgsql, ENVIRONMENT=testing-pgsql
|
- DB=pgsql
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS todo_test;' -U postgres; fi"
|
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS todo_test;' -U postgres; fi"
|
||||||
@ -30,7 +30,7 @@ after_script:
|
|||||||
matrix:
|
matrix:
|
||||||
exclude:
|
exclude:
|
||||||
- php: hhvm
|
- php: hhvm
|
||||||
env: DB=pgsql, ENVIRONMENT=testing-pgsql
|
env: DB=pgsql
|
||||||
allow_failures:
|
allow_failures:
|
||||||
- php: hhvm
|
- php: hhvm
|
||||||
fast_finish: true
|
fast_finish: true
|
@ -32,7 +32,8 @@ exit;
|
|||||||
* NOTE: If you change these, also change the error_reporting() code below
|
* NOTE: If you change these, also change the error_reporting() code below
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
define('ENVIRONMENT', 'testing');
|
$env_part = (isset($_ENV['DB'])) ? $_ENV['DB'] : '';
|
||||||
|
define('ENVIRONMENT', ( ! empty($env_part)) ? "testing-{$env_part}" : 'testing');
|
||||||
/*
|
/*
|
||||||
*---------------------------------------------------------------
|
*---------------------------------------------------------------
|
||||||
* ERROR REPORTING
|
* ERROR REPORTING
|
||||||
|
Loading…
Reference in New Issue
Block a user