Update travis config to properly select environment
This commit is contained in:
parent
b3c0e6ac6b
commit
27ed3ee040
@ -9,8 +9,8 @@ install:
|
||||
- composer install
|
||||
|
||||
env:
|
||||
- DB=mysql, ENVIRONMENT=testing-mysql
|
||||
- DB=pgsql, ENVIRONMENT=testing-pgsql
|
||||
- DB=mysql
|
||||
- DB=pgsql
|
||||
|
||||
before_script:
|
||||
- sh -c "if [ '$DB' = 'pgsql' ]; then psql -c 'DROP DATABASE IF EXISTS todo_test;' -U postgres; fi"
|
||||
@ -30,7 +30,7 @@ after_script:
|
||||
matrix:
|
||||
exclude:
|
||||
- php: hhvm
|
||||
env: DB=pgsql, ENVIRONMENT=testing-pgsql
|
||||
env: DB=pgsql
|
||||
allow_failures:
|
||||
- php: hhvm
|
||||
fast_finish: true
|
@ -32,7 +32,8 @@ exit;
|
||||
* 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
|
||||
|
Loading…
Reference in New Issue
Block a user