language: php

cache:
  yarn: true
  directories:
    - node_modules

dist: trusty
sudo: required

php:
  - 7.1
  - 7.2

env:
  - TRAVIS_NODE_VERSION="8.1.3"

before_script:
  - cp app/config/parameters.yml.travis app/config/parameters.yml
  - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
  - node -v
  - yarn install
  - composer install -vv
  - yarn encore production
  - php bin/console doctrine:database:create --env=test
  - php bin/console doctrine:schema:create --env=test
  - php bin/console hautelook_alice:doctrine:fixtures:load --no-interaction --env=test

script:
  - ./vendor/bin/phpunit
  - ./vendor/bin/security-checker security:check
  - ./vendor/bin/phpstan analyse

language: php

cache:
  yarn: true
  directories:
    - node_modules

dist: trusty
sudo: required

php:
  - 7.1
  - 7.2

env:
  - TRAVIS_NODE_VERSION="12.8.0"

before_script:
  - cp app/config/parameters.yml.travis app/config/parameters.yml
  - rm -rf ~/.nvm && git clone https://github.com/creationix/nvm.git ~/.nvm && (cd ~/.nvm && git checkout `git describe --abbrev=0 --tags`) && source ~/.nvm/nvm.sh && nvm install $TRAVIS_NODE_VERSION
  - node -v
  - yarn install
  - composer install -vv
  - yarn encore production
  - php bin/console doctrine:database:create --env=test
  - php bin/console doctrine:schema:create --env=test
  - php bin/console hautelook_alice:doctrine:fixtures:load --no-interaction --env=test

script:
  - ./vendor/bin/phpunit
  - ./vendor/bin/security-checker security:check
  - ./vendor/bin/phpstan analyse

Update node version from 8.1.3 to 12.8.0 and nvm from 0.33.2 to 0.34.0
Update node version from 8.1.3 to 12.8.0 and nvm from 0.33.2 to 0.34.0

Also update TRAVIS_NODE_VERSION
