language: php

sudo: required

services:
    - docker

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

php:
    - 5.5
    - 5.6
    - 7.0
    - hhvm

env:
    global:
        - SYMFONY_ENV=test

matrix:
    fast_finish: true
    allow_failures:
        - php: hhvm # See https://github.com/travis-ci/travis-ci/issues/6091
    include:
        - php: 5.5
          env: COVERAGE=true

before_install:
    - . $HOME/.nvm/nvm.sh
    - nvm install 6
    - nvm use 6
    - npm install -g bower gulp-cli

install:
    - make COMPOSEROPTS="--prefer-dist --no-interaction" deps

before_script:
    - php bin/console doctrine:schema:update --force
    - make frontend

script:
    - make test

after_success:
    - if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PHP_VERSION == 5.6 ]]; then
      docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
      docker build -t webplates/symfony .;
      docker push webplates/symfony;
      fi

language: php

sudo: required

services:
    - docker

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

php:
    - 5.5
    - 5.6
    - 7.0
    - hhvm

env:
    global:
        - SYMFONY_ENV=test

matrix:
    fast_finish: true
    allow_failures:
        - php: hhvm # See https://github.com/travis-ci/travis-ci/issues/6091
    include:
        - php: 5.5
          env: COVERAGE=true

before_install:
    - . $HOME/.nvm/nvm.sh
    - nvm install 6
    - nvm use 6
    - npm install -g bower gulp-cli

install:
    - make COMPOSEROPTS="--prefer-dist --prefer-stable --no-interaction" deps

before_script:
    - php bin/console doctrine:schema:update --force
    - make frontend

script:
    - make test

after_success:
    - if [[ $TRAVIS_BRANCH == "master" && $TRAVIS_PHP_VERSION == 5.6 ]]; then
      docker login -e="$DOCKER_EMAIL" -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD";
      travis_retry composer install --prefer-dist --prefer-stable --no-interaction --no-dev
      docker build -t webplates/symfony .;
      docker push webplates/symfony;
      fi

Install no-dev dependencies for image build
Install no-dev dependencies for image build
