more fixes for travis
This commit is contained in:
parent
616f44f9c5
commit
5e323c3310
11
.env.travis
Normal file
11
.env.travis
Normal 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
|
10
.travis.yml
10
.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
|
||||
|
9
Makefile
9
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:
|
||||
|
@ -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' => '',
|
||||
],
|
||||
|
||||
|
@ -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');
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user