diff --git a/.travis.yml b/.travis.yml index 08eb1433..53c756e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,58 +1,19 @@ -# .travis.yml -os: linux -sudo: required -language: php -cache: - directories: - - $HOME/.composer/cache - - ${TRAVIS_BUILD_DIR}/travis/extension-cache - - vendor - -matrix: - fast_finish: true - include: - - php: 7.1 - env: LARAVEL='5.5.*' TESTBENCH='3.5.*' COMPOSER_FLAGS='--prefer-lowest' - - php: 7.1 - env: LARAVEL='5.5.*' TESTBENCH='3.5.*' - - php: 7.1 - env: LARAVEL='5.6.*' TESTBENCH='3.6.*' - - php: 7.1 - env: LARAVEL='5.7.*' TESTBENCH='3.7.*' - - php: 7.1 - env: LARAVEL='5.8.*' TESTBENCH='3.8.*' - - php: 7.2 - env: LARAVEL='5.5.*' TESTBENCH='3.5.*' - - php: 7.2 - env: LARAVEL='5.6.*' TESTBENCH='3.6.*' - - php: 7.2 - env: LARAVEL='5.7.*' TESTBENCH='3.7.*' - - php: 7.2 - env: LARAVEL='5.8.*' TESTBENCH='3.8.*' - - php: 7.3 - env: LARAVEL='5.5.*' TESTBENCH='3.5.*' - - php: 7.3 - env: LARAVEL='5.6.*' TESTBENCH='3.6.*' - - php: 7.3 - env: LARAVEL='5.7.*' TESTBENCH='3.7.*' - - php: 7.3 - env: LARAVEL='5.8.*' TESTBENCH='3.8.*' - allow_failures: - - php: 7.1 - env: LARAVEL='5.5.*' TESTBENCH='3.5.*' COMPOSER_FLAGS='--prefer-lowest' - -before_script: - - sudo mysql -e "use mysql; update user set authentication_string=PASSWORD('root') where User='root'; update user set plugin='mysql_native_password';FLUSH PRIVILEGES;" - - sudo mysql_upgrade -u root -proot - - sudo service mysql restart - - travis_retry composer self-update --stable -n - - travis_retry composer require --no-update --no-interaction "illuminate/support:${LARAVEL}" "orchestra/testbench:${TESTBENCH}" - -install: - - travis_retry composer update --no-interaction --no-plugins --no-suggest --prefer-source ${COMPOSER_FLAGS} - -script: - - vendor/bin/phpunit - -notifications: - email: false + language: php + php: + - 7.2 + services: + - mysql + env: + global: + - APP_ENV: production + - DB_USERNAME: root + - DB_DATABASE: eloquentFilter_test + - DB_PASSWORD: root + before_install: + - mysql -e 'create database test' + install: + - travis_retry composer install --no-interaction --prefer-dist --no-suggest + - nvm install 5.10.1 + before_script: + - composer install --no-interaction + script: vendor/bin/phpunit diff --git a/tests/TestCase.php b/tests/TestCase.php index 96cede48..b507f4d6 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -43,6 +43,5 @@ protected function getEnvironmentSetUp($app) echo shell_exec('mysql -h ' . $host . ' -u ' . $username . ' -p' . $password . ' -e "CREATE DATABASE IF NOT EXISTS ' . $database . '"'); $app['config']->set('database.connections.mysql.database', $database); - } }