sudo: false

language: node_js

env:
  - TEST=lint-ci
  - TEST=test-ci

node_js:
  - 8
  - 7

cache:
  apt: true
  yarn: true
  directories:
    - node_modules
    - flow-typed
    - app/node_modules

addons:
  apt:
    packages:
      - icnsutils
      - graphicsmagick
      - xz-utils
      - xorriso

install:
  - yarn
  - cd app && yarn && cd ..
  - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"

before_script:
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start &
  - sleep 3

script:
  - "yarn $TEST"

sudo: false

language: node_js

env:
  - TEST=lint-ci
  - TEST=test-ci

node_js:
  - node
  - 8

cache:
  apt: true
  yarn: true
  directories:
    - node_modules
    - flow-typed
    - app/node_modules

addons:
  apt:
    packages:
      - icnsutils
      - graphicsmagick
      - xz-utils
      - xorriso

install:
  - yarn
  - cd app && yarn && cd ..
  - "/sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16"

before_script:
  - export DISPLAY=:99.0
  - sh -e /etc/init.d/xvfb start &
  - sleep 3

script:
  - "yarn $TEST"

Test on node 8 and the lastest stable release
enhance(ci): Test on node 8 and the lastest stable release

Because yarn no longer supports node 7:

  warning You are using Node "7.10.1" which is not supported and may encounter bugs or unexpected behavior. Yarn supports the following semver range: "^4.8.0 || ^5.7.0 || ^6.2.2 || >=8.0.0"
