language: php

php: 7.1

sudo: false

before_script:
  - composer self-update
  - composer install --prefer-source --no-interaction --dev
  - yarn install
  - yarn production

script:
  - vendor/bin/phpspec run --verbose
  - vendor/bin/parallel-lint --exclude vendor .
  - vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml

after_script:
  - vendor/bin/test-reporter

addons:
  code_climate:
    repo_token: $CODE_CLIMATE_TOKEN

language: php

php: 7.1

sudo: false

cache:
  yarn: true
  directories:
    - node_modules
    - vendor

before_install:
  # Repo for newer Node.js versions
  - curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
  # Repo for Yarn
  - sudo apt-key adv --keyserver pgp.mit.edu --recv D101F7899D41F3C3
  - echo "deb http://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
  - sudo apt-get update -qq
  - sudo apt-get install -y -qq yarn

before_script:
  - composer self-update
  - composer install --prefer-source --no-interaction --dev
  - yarn install
  - yarn production

script:
  - vendor/bin/phpspec run --verbose
  - vendor/bin/parallel-lint --exclude vendor .
  - vendor/bin/phpunit --verbose --coverage-clover build/logs/clover.xml

after_script:
  - vendor/bin/test-reporter

addons:
  code_climate:
    repo_token: $CODE_CLIMATE_TOKEN

Add cache and install Yarn
Add cache and install Yarn
