From 2bd8072403f59984385263880b59329c48eaeb51 Mon Sep 17 00:00:00 2001 From: denisdulici Date: Mon, 1 Oct 2018 13:22:55 +0300 Subject: [PATCH] added travis env file --- .env.travis | 28 ++++++++++++++++++++++++++++ .travis.yml | 6 +++++- tests/TestCase.php | 2 +- 3 files changed, 34 insertions(+), 2 deletions(-) create mode 100644 .env.travis diff --git a/.env.travis b/.env.travis new file mode 100644 index 000000000..06c4695e8 --- /dev/null +++ b/.env.travis @@ -0,0 +1,28 @@ +APP_NAME=Akaunting +APP_ENV=testing +APP_LOCALE=en-GB +APP_INSTALLED=true +APP_KEY=base64:xBC+BxlC7sXhYAtpTZv8TYAHqoPgsJaXL0S5Id6BbBc= +APP_DEBUG=true +APP_LOG_LEVEL=debug +APP_URL=http://akaunting.test + +DB_CONNECTION=mysql +DB_HOST=localhost +DB_PORT=3306 +DB_DATABASE=akaunting +DB_USERNAME=root +DB_PASSWORD= +DB_PREFIX=ak_ + +BROADCAST_DRIVER=log +CACHE_DRIVER=file +SESSION_DRIVER=file +QUEUE_DRIVER=database + +MAIL_DRIVER=mail +MAIL_HOST=localhost +MAIL_PORT=2525 +MAIL_USERNAME=null +MAIL_PASSWORD=null +MAIL_ENCRYPTION=null diff --git a/.travis.yml b/.travis.yml index bc0507dc0..515d3beee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,8 +7,12 @@ php: - '7.2' before_script: - - composer self-update + - cp .env.travis .env + - mysql -e 'CREATE DATABASE akaunting;' - composer install --no-interaction + - php artisan migrate --force + - php artisan db:seed --class=Database\Seeds\TestCompany + - php artisan company:seed company 1 script: - vendor/bin/phpunit \ No newline at end of file diff --git a/tests/TestCase.php b/tests/TestCase.php index 386b5bb4d..f480accec 100644 --- a/tests/TestCase.php +++ b/tests/TestCase.php @@ -16,6 +16,6 @@ abstract class TestCase extends BaseTestCase parent::setUp(); Artisan::call('db:seed', ['--class' => '\Database\Seeds\TestCompany', '--force' => true]); - Artisan::call('company:seed',['company' => 1]); + Artisan::call('company:seed', ['company' => 1]); } } \ No newline at end of file