Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added TravisCI config file #56

Merged
merged 9 commits into from
Dec 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
language: php

php:
- 5.6
- 7.0
- 7.1

# This triggers builds to run on the new TravisCI infrastructure.
# See: http://docs.travis-ci.com/user/workers/container-based-infrastructure/
sudo: false

## Cache composer for faster builds
cache:
directories:
- $HOME/.composer/cache

before_script:
- cd ./webservice
- cp .env.travis .env
- travis_retry composer self-update
- travis_retry composer update --no-interaction --prefer-dist
- php artisan key:gen
- php artisan jwt:secret -f

script:
- vendor/bin/phpunit
37 changes: 37 additions & 0 deletions webservice/.env.travis
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
APP_ENV=local
APP_KEY=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost

# Please create database file: /database/database.sqlite
DB_CONNECTION=sqlite

#DB_CONNECTION=mysql
#DB_HOST=127.0.0.1
#DB_PORT=3306
#DB_DATABASE=homestead
#DB_USERNAME=homestead
#DB_PASSWORD=secret

BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

PUSHER_APP_ID=
PUSHER_KEY=
PUSHER_SECRET=

JWT_SECRET=
4 changes: 2 additions & 2 deletions webservice/app/Exceptions/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ protected function handleExceptionJsonResponse($request, Exception $e)
'messages' => [$e->getMessage()],
];

// If it's a HttpException the use the appropriate HTTP status code instead of 500
// If it's a HttpException then use the appropriate HTTP status code instead of 500
if ($e instanceof HttpException) {
$code = $e->getStatusCode();
}

// If the debugging is on then include in the exception trace in the body of the response
// If the debugging is on then include the exception trace in the body of the response
if (config('app.debug')) {
$body['trace'] = $e->getTrace();
}
Expand Down