Skip to content

Instantly share code, notes, and snippets.

@jjcodes78
Last active July 3, 2017 17:37
Show Gist options
  • Save jjcodes78/7348f7a2e2b402ce0bd9041d96fbf122 to your computer and use it in GitHub Desktop.
Save jjcodes78/7348f7a2e2b402ce0bd9041d96fbf122 to your computer and use it in GitHub Desktop.
Laravel Framework configuration script with Laravel Dusk (browser tests) for Codeship CI
# We support all major PHP versions. Please see our documentation for a full list.
# https://documentation.codeship.com/basic/languages-frameworks/php/
#
# By default we use the latest PHP version from the 5.5 release branch, but Laravel
# requires at least version 5.6.4
#
phpenv local 7.1
#
# Install extensions via PECL
#pecl install -f memcache
#
# Prepare cache directory and install dependencies
#
mkdir -p ./bootstrap/cache
composer install --no-interaction
#
# Prepare application enviroment
#
cp .env.example .env
php artisan key:generate
#
# Prepare the test database
#
touch ./database/database.sqlite
php artisan migrate
#
# Prepare Browser Test
#
export DUSK_START_CHROMEDRIVER=false
export DUSK_CHROME_BINARY=/usr/bin/chromium-browser
nohup bash -c "./vendor/laravel/dusk/bin/chromedriver-linux 2>&1 &"
nohup bash -c "php artisan serve 2>&1 &"
./vendor/phpunit/phpunit/phpunit
php artisan dusk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment