Should fix failing travis builds
This commit is contained in:
parent
7f0130100d
commit
ebb3a01036
6 changed files with 19 additions and 28 deletions
|
@ -24,10 +24,6 @@ MAIL_PASSWORD=null
|
||||||
MAIL_ENCRYPTION=null
|
MAIL_ENCRYPTION=null
|
||||||
MAIL_FROM=you@example.com
|
MAIL_FROM=you@example.com
|
||||||
|
|
||||||
API_PREFIX=api
|
|
||||||
API_VERSION=v1
|
|
||||||
API_DEBUG=false
|
|
||||||
|
|
||||||
QUEUE_DRIVER=database
|
QUEUE_DRIVER=database
|
||||||
QUEUE_HIGH=high
|
QUEUE_HIGH=high
|
||||||
QUEUE_STANDARD=standard
|
QUEUE_STANDARD=standard
|
||||||
|
|
15
.env.travis
15
.env.travis
|
@ -1,13 +1,16 @@
|
||||||
APP_ENV=testing
|
APP_ENV=testing
|
||||||
APP_DEBUG=true
|
APP_DEBUG=true
|
||||||
APP_KEY=aaaaabbbbbcccccdddddeeeeefffff12
|
APP_KEY=SomeRandomString3232RandomString
|
||||||
|
APP_THEME=pterodactyl
|
||||||
|
APP_TIMEZONE=UTC
|
||||||
|
APP_URL=http://localhost/
|
||||||
|
|
||||||
TEST_DB_CONNECTION=tests
|
DB_HOST=127.0.0.1
|
||||||
TEST_DB_TEST_USERNAME=root
|
DB_DATABASE=travis
|
||||||
TEST_DB_TEST_PASSWORD=
|
DB_USERNAME=root
|
||||||
TEST_DB_HOST=127.0.0.1
|
DB_PASSWORD=""
|
||||||
|
|
||||||
CACHE_DRIVER=array
|
CACHE_DRIVER=array
|
||||||
SESSION_DRIVER=array
|
SESSION_DRIVER=array
|
||||||
QUEUE_DRIVER=sync
|
|
||||||
MAIL_DRIVER=array
|
MAIL_DRIVER=array
|
||||||
|
QUEUE_DRIVER=sync
|
||||||
|
|
|
@ -14,9 +14,8 @@ before_install:
|
||||||
before_script:
|
before_script:
|
||||||
- phpenv config-rm xdebug.ini
|
- phpenv config-rm xdebug.ini
|
||||||
- cp .env.travis .env
|
- cp .env.travis .env
|
||||||
- composer install --no-interaction --prefer-dist --no-suggest --no-scripts --verbose
|
- composer install --no-interaction --prefer-dist --no-suggest --verbose
|
||||||
- php artisan migrate -v
|
- php artisan migrate --seed -v
|
||||||
- php artisan db:seed -v
|
|
||||||
script:
|
script:
|
||||||
- vendor/bin/phpunit --coverage-clover coverage.xml
|
- vendor/bin/phpunit --coverage-clover coverage.xml
|
||||||
notifications:
|
notifications:
|
||||||
|
|
|
@ -73,7 +73,10 @@ class AppServiceProvider extends ServiceProvider
|
||||||
return Cache::remember('git-version', 5, function () {
|
return Cache::remember('git-version', 5, function () {
|
||||||
if (file_exists(base_path('.git/HEAD'))) {
|
if (file_exists(base_path('.git/HEAD'))) {
|
||||||
$head = explode(' ', file_get_contents(base_path('.git/HEAD')));
|
$head = explode(' ', file_get_contents(base_path('.git/HEAD')));
|
||||||
$path = base_path('.git/' . trim($head[1]));
|
|
||||||
|
if (array_key_exists(1, $head)) {
|
||||||
|
$path = base_path('.git/' . trim($head[1]));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($path) && file_exists($path)) {
|
if (isset($path) && file_exists($path)) {
|
||||||
|
|
|
@ -44,19 +44,6 @@ return [
|
||||||
'prefix' => '',
|
'prefix' => '',
|
||||||
'strict' => false,
|
'strict' => false,
|
||||||
],
|
],
|
||||||
|
|
||||||
'tests' => [
|
|
||||||
'driver' => 'mysql',
|
|
||||||
'host' => env('TEST_DB_HOST', 'localhost'),
|
|
||||||
'port' => env('TEST_DB_PORT', '3306'),
|
|
||||||
'database' => env('TEST_DB_DATABASE', 'travis'),
|
|
||||||
'username' => env('TEST_DB_USERNAME', 'root'),
|
|
||||||
'password' => env('TEST_DB_PASSWORD', ''),
|
|
||||||
'charset' => 'utf8',
|
|
||||||
'collation' => 'utf8_unicode_ci',
|
|
||||||
'prefix' => '',
|
|
||||||
'strict' => false,
|
|
||||||
],
|
|
||||||
],
|
],
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -24,7 +24,10 @@
|
||||||
</filter>
|
</filter>
|
||||||
<php>
|
<php>
|
||||||
<env name="APP_ENV" value="testing"/>
|
<env name="APP_ENV" value="testing"/>
|
||||||
<env name="DB_CONNECTION" value="tests"/>
|
<env name="DB_CONNECTION" value="mysql"/>
|
||||||
|
<env name="DB_USERNAME" value="root"/>
|
||||||
|
<env name="DB_PASSWORD" value=""/>
|
||||||
|
<env name="DB_DATABASE" value="travis"/>
|
||||||
<env name="CACHE_DRIVER" value="array"/>
|
<env name="CACHE_DRIVER" value="array"/>
|
||||||
<env name="SESSION_DRIVER" value="array"/>
|
<env name="SESSION_DRIVER" value="array"/>
|
||||||
<env name="QUEUE_DRIVER" value="sync"/>
|
<env name="QUEUE_DRIVER" value="sync"/>
|
||||||
|
|
Loading…
Reference in a new issue