Skip to content

Commit ebb3a01

Browse files
committed
Should fix failing travis builds
1 parent 7f01301 commit ebb3a01

File tree

6 files changed

+19
-28
lines changed

6 files changed

+19
-28
lines changed

.env.example

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ MAIL_PASSWORD=null
2424
MAIL_ENCRYPTION=null
2525
MAIL_FROM=you@example.com
2626

27-
API_PREFIX=api
28-
API_VERSION=v1
29-
API_DEBUG=false
30-
3127
QUEUE_DRIVER=database
3228
QUEUE_HIGH=high
3329
QUEUE_STANDARD=standard

.env.travis

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
APP_ENV=testing
22
APP_DEBUG=true
3-
APP_KEY=aaaaabbbbbcccccdddddeeeeefffff12
3+
APP_KEY=SomeRandomString3232RandomString
4+
APP_THEME=pterodactyl
5+
APP_TIMEZONE=UTC
6+
APP_URL=http://localhost/
47

5-
TEST_DB_CONNECTION=tests
6-
TEST_DB_TEST_USERNAME=root
7-
TEST_DB_TEST_PASSWORD=
8-
TEST_DB_HOST=127.0.0.1
8+
DB_HOST=127.0.0.1
9+
DB_DATABASE=travis
10+
DB_USERNAME=root
11+
DB_PASSWORD=""
912

1013
CACHE_DRIVER=array
1114
SESSION_DRIVER=array
12-
QUEUE_DRIVER=sync
1315
MAIL_DRIVER=array
16+
QUEUE_DRIVER=sync

.travis.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ before_install:
1414
before_script:
1515
- phpenv config-rm xdebug.ini
1616
- cp .env.travis .env
17-
- composer install --no-interaction --prefer-dist --no-suggest --no-scripts --verbose
18-
- php artisan migrate -v
19-
- php artisan db:seed -v
17+
- composer install --no-interaction --prefer-dist --no-suggest --verbose
18+
- php artisan migrate --seed -v
2019
script:
2120
- vendor/bin/phpunit --coverage-clover coverage.xml
2221
notifications:

app/Providers/AppServiceProvider.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,10 @@ protected function versionData()
7373
return Cache::remember('git-version', 5, function () {
7474
if (file_exists(base_path('.git/HEAD'))) {
7575
$head = explode(' ', file_get_contents(base_path('.git/HEAD')));
76-
$path = base_path('.git/' . trim($head[1]));
76+
77+
if (array_key_exists(1, $head)) {
78+
$path = base_path('.git/' . trim($head[1]));
79+
}
7780
}
7881

7982
if (isset($path) && file_exists($path)) {

config/database.php

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -44,19 +44,6 @@
4444
'prefix' => '',
4545
'strict' => false,
4646
],
47-
48-
'tests' => [
49-
'driver' => 'mysql',
50-
'host' => env('TEST_DB_HOST', 'localhost'),
51-
'port' => env('TEST_DB_PORT', '3306'),
52-
'database' => env('TEST_DB_DATABASE', 'travis'),
53-
'username' => env('TEST_DB_USERNAME', 'root'),
54-
'password' => env('TEST_DB_PASSWORD', ''),
55-
'charset' => 'utf8',
56-
'collation' => 'utf8_unicode_ci',
57-
'prefix' => '',
58-
'strict' => false,
59-
],
6047
],
6148

6249
/*

phpunit.xml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,10 @@
2424
</filter>
2525
<php>
2626
<env name="APP_ENV" value="testing"/>
27-
<env name="DB_CONNECTION" value="tests"/>
27+
<env name="DB_CONNECTION" value="mysql"/>
28+
<env name="DB_USERNAME" value="root"/>
29+
<env name="DB_PASSWORD" value=""/>
30+
<env name="DB_DATABASE" value="travis"/>
2831
<env name="CACHE_DRIVER" value="array"/>
2932
<env name="SESSION_DRIVER" value="array"/>
3033
<env name="QUEUE_DRIVER" value="sync"/>

0 commit comments

Comments
 (0)