Skip to content

Instantly share code, notes, and snippets.

@vivex
Created July 14, 2016 09:10
Show Gist options
  • Save vivex/ea3c822762415ec5ea9df15f7935b647 to your computer and use it in GitHub Desktop.
Save vivex/ea3c822762415ec5ea9df15f7935b647 to your computer and use it in GitHub Desktop.
language: php
php:
- 5.6
services:
- mysql
addons:
hosts:
- example.org
before_script:
- sudo apt-get update
- composer self-update -n
- composer install #downloads vendor
- composer install --prefer-dist -n # no idea
- mysql -e "GRANT ALL ON *.* TO shippable@localhost IDENTIFIED BY ''; FLUSH PRIVILEGES;" #creating shippable user
- mysql -e "create database if not exists sample;" # create database
- mysql -e "show databases;" # lists databases
- cp .env.testing .env # creates .env file
- php artisan key:generate # generates secure key
- php artisan config:cache # caches config (without it laravel throws error that secure key is not there)
- php artisan migrate --env=testing #creates database table
- php artisan db:seed # seeds database with seeders
script:
- phpunit --log-junit shippable/testresults/junit.xml --coverage-xml shippable/codecoverage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment