sudo: required

services:
  - docker

language: ruby

env:
  - DOCKER_COMPOSE_VERSION: 1.8.1

before_install:
  - sudo rm /usr/local/bin/docker-compose
  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin

install:
  - cp .env.docker .env
  - cp docker-compose.sample.yml docker-compose.yml
  - docker-compose stop
  - docker-compose rm -f
  - docker-compose build

script:
  - docker-compose run --rm composer install
  - docker-compose run --rm phpunit
  - docker-compose run --rm npm install
  - docker-compose run --rm gulp --production
  - docker-compose run --rm artisan key:generate
  - docker-compose up -d
  - sleep 10s
  - docker-compose run --rm artisan migrate:refresh --seed
  - docker-compose run --rm artisan db:seed --class=DummyBookmarksSeeder

sudo: required

services:
  - docker

language: ruby

env:
  - DOCKER_COMPOSE_VERSION: 1.8.1

before_install:
  - sudo rm /usr/local/bin/docker-compose
  - curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
  - chmod +x docker-compose
  - sudo mv docker-compose /usr/local/bin

install:
  - cp .env.docker .env
  - cp docker-compose.sample.yml docker-compose.yml
  - docker-compose stop
  - docker-compose rm -f
  - docker-compose build

script:
  - docker-compose run --rm composer install
  - docker-compose run --rm npm install
  - docker-compose run --rm gulp --production
  - docker-compose run --rm artisan key:generate
  - docker-compose run --rm phpunit
  - docker-compose up -d
  - sleep 10s
  - docker-compose run --rm artisan migrate:refresh --seed
  - docker-compose run --rm artisan db:seed --class=DummyBookmarksSeeder

Change order when phpunit gets run as it has a dependency on a gulp run.
Change order when phpunit gets run as it has a dependency on a gulp run.
