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_FROM=you@example.com
|
||||
|
||||
API_PREFIX=api
|
||||
API_VERSION=v1
|
||||
API_DEBUG=false
|
||||
|
||||
QUEUE_DRIVER=database
|
||||
QUEUE_HIGH=high
|
||||
QUEUE_STANDARD=standard
|
||||
|
|
15
.env.travis
15
.env.travis
|
@ -1,13 +1,16 @@
|
|||
APP_ENV=testing
|
||||
APP_DEBUG=true
|
||||
APP_KEY=aaaaabbbbbcccccdddddeeeeefffff12
|
||||
APP_KEY=SomeRandomString3232RandomString
|
||||
APP_THEME=pterodactyl
|
||||
APP_TIMEZONE=UTC
|
||||
APP_URL=http://localhost/
|
||||
|
||||
TEST_DB_CONNECTION=tests
|
||||
TEST_DB_TEST_USERNAME=root
|
||||
TEST_DB_TEST_PASSWORD=
|
||||
TEST_DB_HOST=127.0.0.1
|
||||
DB_HOST=127.0.0.1
|
||||
DB_DATABASE=travis
|
||||
DB_USERNAME=root
|
||||
DB_PASSWORD=""
|
||||
|
||||
CACHE_DRIVER=array
|
||||
SESSION_DRIVER=array
|
||||
QUEUE_DRIVER=sync
|
||||
MAIL_DRIVER=array
|
||||
QUEUE_DRIVER=sync
|
||||
|
|
|
@ -14,9 +14,8 @@ before_install:
|
|||
before_script:
|
||||
- phpenv config-rm xdebug.ini
|
||||
- cp .env.travis .env
|
||||
- composer install --no-interaction --prefer-dist --no-suggest --no-scripts --verbose
|
||||
- php artisan migrate -v
|
||||
- php artisan db:seed -v
|
||||
- composer install --no-interaction --prefer-dist --no-suggest --verbose
|
||||
- php artisan migrate --seed -v
|
||||
script:
|
||||
- vendor/bin/phpunit --coverage-clover coverage.xml
|
||||
notifications:
|
||||
|
|
|
@ -73,8 +73,11 @@ class AppServiceProvider extends ServiceProvider
|
|||
return Cache::remember('git-version', 5, function () {
|
||||
if (file_exists(base_path('.git/HEAD'))) {
|
||||
$head = explode(' ', file_get_contents(base_path('.git/HEAD')));
|
||||
|
||||
if (array_key_exists(1, $head)) {
|
||||
$path = base_path('.git/' . trim($head[1]));
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($path) && file_exists($path)) {
|
||||
return [
|
||||
|
|
|
@ -44,19 +44,6 @@ return [
|
|||
'prefix' => '',
|
||||
'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>
|
||||
<php>
|
||||
<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="SESSION_DRIVER" value="array"/>
|
||||
<env name="QUEUE_DRIVER" value="sync"/>
|
||||
|
|
Loading…
Reference in a new issue