more fixes for travis

This commit is contained in:
Nabeel Shahzad 2017-06-08 22:50:22 -05:00
parent 616f44f9c5
commit 5e323c3310
5 changed files with 25 additions and 28 deletions

11
.env.travis Normal file
View File

@ -0,0 +1,11 @@
APP_ENV=testing
APP_KEY=base64:ve66Z5Kt/zTN3p++0zOPu854PHfZkwJE5VuoFAlzHtI=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=testing
CACHE_DRIVER=array
SESSION_DRIVER=array
QUEUE_DRIVER=sync

View File

@ -5,5 +5,11 @@ php:
- '7.1' - '7.1'
- hhvm - hhvm
install: before_script:
- make - cp .env.travis .env
# - mysql -e 'create database phpvms_test;'
- composer self-update
- make build
script:
- vendor/bin/phpunit

View File

@ -9,19 +9,18 @@ all: build
build: build:
composer install composer install --no-interaction
make db @make db
install: install:
echo "" echo ""
db: db:
mkdir -p tmp/ # sqlite3 database/testing.sqlite ""
sqlite3 tmp/database.sqlite ""
php artisan migrate php artisan migrate
reset-db: reset-db:
rm tmp/database.sqlite rm database/testing.sqlite
make db make db
schema: schema:

View File

@ -46,9 +46,9 @@ return [
'connections' => [ 'connections' => [
'sqlite' => [ 'testing' => [
'driver' => 'sqlite', 'driver' => 'sqlite',
'database' => env('DB_DATABASE', base_path('tmp/database.sqlite')), 'database' => database_path('testing.sqlite'),
'prefix' => '', 'prefix' => '',
], ],

View File

@ -1,19 +0,0 @@
<?php
use Illuminate\Foundation\Testing\WithoutMiddleware;
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\DatabaseTransactions;
class ExampleTest extends TestCase
{
/**
* A basic functional test example.
*
* @return void
*/
public function testBasicExample()
{
$this->visit('/')
->see('Laravel');
}
}