Skip to content

Commit

Permalink
Travis Testing
Browse files Browse the repository at this point in the history
  • Loading branch information
freescout-help-desk committed Jul 24, 2018
1 parent 2273b33 commit 0402697
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 21 deletions.
10 changes: 10 additions & 0 deletions .env.travis
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
APP_ENV=testing
APP_KEY=SomeRandomString7

DB_CONNECTION=testing
DB_TEST_USERNAME=root
DB_TEST_PASSWORD=

CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync
13 changes: 13 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
language: php

php:
- 7.0
- 7.1
- 7.2

before_script:
- cp .env.travis .env
- mysql -e 'create database homestead_test;'

script:
- vendor/bin/phpunit
12 changes: 12 additions & 0 deletions config/database.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@
'engine' => null,
],

'testing' => [
'driver' => 'mysql',
'host' => env('DB_TEST_HOST', 'localhost'),
'database' => env('DB_TEST_DATABASE', 'homestead_test'),
'username' => env('DB_TEST_USERNAME', 'homestead'),
'password' => env('DB_TEST_PASSWORD', 'secret'),
'charset' => 'utf8mb4',
'collation' => 'utf8mb4_unicode_ci',
'prefix' => '',
'strict' => false,
],

'pgsql' => [
'driver' => 'pgsql',
'host' => env('DB_HOST', '127.0.0.1'),
Expand Down
1 change: 1 addition & 0 deletions phpunit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
</filter>
<php>
<env name="APP_ENV" value="testing"/>
<env name="DB_CONNECTION" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="QUEUE_DRIVER" value="sync"/>
Expand Down
21 changes: 0 additions & 21 deletions tests/Feature/ExampleTest.php

This file was deleted.

0 comments on commit 0402697

Please sign in to comment.