Skip to content

Commit

Permalink
Travis (#1)
Browse files Browse the repository at this point in the history
Travis
  • Loading branch information
erjanmx authored Dec 20, 2017
1 parent ad7c1ef commit 4af29af
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 21 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
/.phpintel
build
composer.lock
vendor
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -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
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
7 changes: 0 additions & 7 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,4 @@
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage" charset="UTF-8" yui="true" highlight="true"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
</phpunit>
7 changes: 5 additions & 2 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

namespace Erjanmx\MigrateCheck\Test;

use Illuminate\Support\Facades\Schema;
use Illuminate\Support\Facades\Artisan;
use Orchestra\Testbench\TestCase as Orchestra;

Expand Down Expand Up @@ -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');
}
}

0 comments on commit 4af29af

Please sign in to comment.