language: node_js

node_js:
  - 6

services:
  - docker

# Dependencies for `canvas` (required by `d3`)
# See https://github.com/Automattic/node-canvas/blob/master/.travis.yml
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - libcairo2-dev
      - libjpeg8-dev
      - libpango1.0-dev
      - libgif-dev
      - g++-4.9
env:
  - CXX=g++-4.9

cache:
  directories:
    - node_modules

# Temporarily skip to speed up debugging

#before_script:
#  - npm install documentation

script:
  #- make lint
  - make build
  #- make test-all
  #- make cover
  #- make docs

after_success:
  - bash <(curl -s https://codecov.io/bash)

before_deploy:
  - |
    export BUILD_VERSION=build-$(date --utc --iso-8601)-$TRAVIS_COMMIT-$TRAVIS_BUILD_NUMBER
    mv build $BUILD_VERSION

deploy:
  on:
    all_branches: true
  skip_cleanup: true
  local_dir: $BUILD_VERSION
  provider: s3
  access_key_id: $AWS_ACCESS_KEY_ID
  secret_access_key: $AWS_SECRET_ACCESS_KEY
  region: us-west-2
  bucket: test.stenci.la

language: node_js

node_js:
  - 6

services:
  - docker

# Dependencies for `canvas` (required by `d3`)
# See https://github.com/Automattic/node-canvas/blob/master/.travis.yml
addons:
  apt:
    sources:
      - ubuntu-toolchain-r-test
    packages:
      - libcairo2-dev
      - libjpeg8-dev
      - libpango1.0-dev
      - libgif-dev
      - g++-4.9
env:
  - CXX=g++-4.9

cache:
  directories:
    - node_modules

# Temporarily skip to speed up debugging

#before_script:
#  - npm install documentation

script:
  #- make lint
  - make build
  #- make test-all
  #- make cover
  #- make docs

after_success:
  - bash <(curl -s https://codecov.io/bash)

before_deploy:
  - |
    mkdir -p deploy
    export BUILD_VERSION=build-$(date --utc --iso-8601)-$TRAVIS_COMMIT-$TRAVIS_BUILD_NUMBER
    mv build deploy/$BUILD_VERSION

deploy:
  on:
    all_branches: true
  skip_cleanup: true
  local_dir: deploy
  provider: s3
  access_key_id: $AWS_ACCESS_KEY_ID
  secret_access_key: $AWS_SECRET_ACCESS_KEY
  region: us-west-2
  bucket: test.stenci.la

Use a deploy folder so versioned build is a child
Use a deploy folder so versioned build is a child
