language: node_js
node_js:
  - "4"
env:
  - CXX=g++-4.8
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - g++-4.8
before_install:
  - sudo apt-get update -qq
  - sudo apt-get install -qq libcairo2-dev libjpeg8-dev libpango1.0-dev libgif-dev build-essential g++
  - sudo apt-get install -qq xvfb
install:
  - npm install
  - wget -O test_data.zip https://github.com/klokantech/tileserver-gl-data/archive/v0.8.zip
  - unzip -q test_data.zip -d tmp_test_data
  - mkdir test_data
  - mv tmp_test_data/tileserver-gl-data-*/* -t test_data
script:
  - xvfb-run --server-args="-screen 0 1024x768x24" npm test
