diff --git a/.env.travis b/.env.travis new file mode 100644 index 00000000..af52fe4b --- /dev/null +++ b/.env.travis @@ -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 diff --git a/.travis.yml b/.travis.yml index 24e00240..57822622 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,5 +5,11 @@ php: - '7.1' - hhvm -install: - - make +before_script: + - cp .env.travis .env +# - mysql -e 'create database phpvms_test;' + - composer self-update + - make build + +script: + - vendor/bin/phpunit diff --git a/Makefile b/Makefile index b3657039..e8535756 100644 --- a/Makefile +++ b/Makefile @@ -9,19 +9,18 @@ all: build build: - composer install - make db + composer install --no-interaction + @make db install: echo "" db: - mkdir -p tmp/ - sqlite3 tmp/database.sqlite "" + # sqlite3 database/testing.sqlite "" php artisan migrate reset-db: - rm tmp/database.sqlite + rm database/testing.sqlite make db schema: diff --git a/config/database.php b/config/database.php index c010a22c..001537cd 100755 --- a/config/database.php +++ b/config/database.php @@ -46,9 +46,9 @@ return [ 'connections' => [ - 'sqlite' => [ + 'testing' => [ 'driver' => 'sqlite', - 'database' => env('DB_DATABASE', base_path('tmp/database.sqlite')), + 'database' => database_path('testing.sqlite'), 'prefix' => '', ], diff --git a/tests/ExampleTest.php b/tests/ExampleTest.php deleted file mode 100755 index 2f2d20ff..00000000 --- a/tests/ExampleTest.php +++ /dev/null @@ -1,19 +0,0 @@ -visit('/') - ->see('Laravel'); - } -}