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'
|
- '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
|
||||||
|
9
Makefile
9
Makefile
@ -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:
|
||||||
|
@ -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' => '',
|
||||||
],
|
],
|
||||||
|
|
||||||
|
@ -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