language: php

php:
  - 5.6
  - 7.0

matrix:
  allow_failures:
    - php: 7.0

services:
  - mysql

before_script:
  - composer self-update
  - composer install --prefer-source --no-interaction --dev
  - cp .env.travis .env
  - mysql -e 'create database homestead_test;'
  - php artisan migrate --env="testing" --database="testing"
  - php artisan key:generate --env="testing" -n
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then wget https://github.com/digitalkaoz/typehint-to-docblock/releases/download/0.2.2/typehint-to-docblock.phar && php typehint-to-docblock.phar transform tests/specs; fi;'

script:
  - bin/phpspec run -v
  - bin/phpunit

language: php

php:
  - 5.6
  - 7.0

matrix:
  allow_failures:
    - php: 7.0

services:
  - mysql

before_script:
  - composer self-update
  - composer install --prefer-source --no-interaction --dev
  - cp .env.travis .env
  - mysql -e 'create database homestead_test;'
  - php artisan migrate --env="testing" --database="testing"
  - php artisan key:generate --env="testing" -n
  - bash -c 'if [ "$TRAVIS_PHP_VERSION" == "7.0" ]; then wget https://github.com/digitalkaoz/typehint-to-docblock/releases/download/0.2.2/typehint-to-docblock.phar && php typehint-to-docblock.phar transform spec; fi;'

script:
  - bin/phpspec run -v
  - bin/phpunit

Fix path for specs in PHP 7 build.
Fix path for specs in PHP 7 build.
