language: php

sudo: false

env:
  global:
    secure: E9/Y2vJv4GGGdjRZUJuL31q79C2dbgL1yNcclE4MIPXrPWe5f0LuQMwCGbaGN+b6u/VX6YQL6OcFt+VsxL5e439EoYMMY+MmUeDnq5jRzPOVZqgXlNZAxh4KzoNh3Q2nXp6uSr+yaNCFedcx1Os7n5CoLwqji+TATsTPZ1EEDqI=

cache:
  directories:
    - $HOME/.composer/cache

services:
  - redis-server

php:
  - 5.6
  - 7.0

matrix:
  fast_finish: true

before_script:
    - cp app/config/parameters.yml.dist app/config/parameters.yml
    - 'echo "    github.client_id: $GH_CLIENT_ID" >> app/config/parameters.yml'
    - 'echo "    github.client_secret: $GH_CLIENT_SECRET" >> app/config/parameters.yml'
    - curl -sSL https://raw.githubusercontent.com/moliware/travis-solr/master/travis-solr.sh | SOLR_VERSION=3.5.0 SOLR_CONFS="doc/schema.xml" bash
    - composer install
    - app/console doc:sch:create --env=test -n

script:
    - phpunit

git:
  depth: 5

language: php

sudo: false

env:
  global:
    secure: E9/Y2vJv4GGGdjRZUJuL31q79C2dbgL1yNcclE4MIPXrPWe5f0LuQMwCGbaGN+b6u/VX6YQL6OcFt+VsxL5e439EoYMMY+MmUeDnq5jRzPOVZqgXlNZAxh4KzoNh3Q2nXp6uSr+yaNCFedcx1Os7n5CoLwqji+TATsTPZ1EEDqI=

cache:
  directories:
    - $HOME/.composer/cache

services:
  - redis-server

php:
  - 5.6
  - 7.0

matrix:
  fast_finish: true

before_script:
    - cp app/config/parameters.yml.dist app/config/parameters.yml
    - 'mysql -uroot -e "CREATE DATABASE packagist_test;"'
    - 'echo "    github.client_id: $GH_CLIENT_ID" >> app/config/parameters.yml'
    - 'echo "    github.client_secret: $GH_CLIENT_SECRET" >> app/config/parameters.yml'
    - curl -sSL https://raw.githubusercontent.com/moliware/travis-solr/master/travis-solr.sh | SOLR_VERSION=3.5.0 SOLR_CONFS="doc/schema.xml" bash
    - composer install
    - app/console doc:sch:create --env=test -n

script:
    - phpunit

git:
  depth: 5

Create DB before using it
Create DB before using it
