From 4af29afa8bb135376130eca9ac5d5a35e39dd990 Mon Sep 17 00:00:00 2001 From: Erjan Kalybek Date: Wed, 20 Dec 2017 17:20:12 +0300 Subject: [PATCH] Travis (#1) Travis --- .gitignore | 1 + .travis.yml | 16 ++++++++-------- composer.json | 8 ++++---- phpunit.xml.dist | 7 ------- tests/TestCase.php | 7 +++++-- 5 files changed, 18 insertions(+), 21 deletions(-) diff --git a/.gitignore b/.gitignore index 073e37a..792129d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +/.phpintel build composer.lock vendor diff --git a/.travis.yml b/.travis.yml index e04a5b7..1cedd55 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,17 @@ language: php php: - - 7.0 + - '7.0' + - '7.1' + - '7.2' services: - mysql -env: - matrix: - - COMPOSER_FLAGS="--prefer-lowest" - - COMPOSER_FLAGS="" - before_script: - - travis_retry composer self-update - - travis_retry composer update ${COMPOSER_FLAGS} --no-interaction --prefer-source + - composer self-update + - composer install --prefer-source --no-interaction - mysql -e 'create database laravel_migrate_check;' -uroot + +notifications: + email: false diff --git a/composer.json b/composer.json index 087af23..5be4f1c 100644 --- a/composer.json +++ b/composer.json @@ -19,13 +19,13 @@ ], "require": { "php": "^7.0", - "illuminate/console": "^5.3.28", - "illuminate/events": "^5.3.28" + "illuminate/console": "^5.5.17", + "illuminate/events": "^5.5.17" }, "require-dev": { "mockery/mockery": "^1.0", - "orchestra/testbench": "^3.3", - "phpunit/phpunit": "5.*" + "orchestra/testbench": "~3.0", + "phpunit/phpunit": "~6.0" }, "autoload": { "psr-4": { diff --git a/phpunit.xml.dist b/phpunit.xml.dist index a0b21b7..d123c90 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -23,11 +23,4 @@ src/ - - - - - - - diff --git a/tests/TestCase.php b/tests/TestCase.php index 077ad96..e9e7e93 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -2,6 +2,7 @@ namespace Erjanmx\MigrateCheck\Test; +use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Artisan; use Orchestra\Testbench\TestCase as Orchestra; @@ -46,8 +47,10 @@ protected function getPackageProviders($app) protected function setUpDatabase() { - $this->app->useDatabasePath(__DIR__ . '/database'); + Schema::dropIfExists('test_table'); + Schema::dropIfExists('migrations'); - Artisan::call('migrate:reset'); + $this->app->useDatabasePath(__DIR__ . '/database'); + Artisan::call('migrate:install'); } }