# branches to build
branches:
  # whitelist
  only:
    - master
    - develop

environment:
  matrix:
  # node.js
    - nodejs_version: "5"
    - nodejs_version: "6"

# Fix line endings on Windows
init:
  - git config --global core.autocrlf true

install:
  # Get the latest stable version of Node 0.STABLE.latest
  - ps: Install-Product node $env:nodejs_version
  - md C:\nc
  - npm install -g npm@^3
  # Workaround https://github.com/npm/npm/wiki/Troubleshooting#upgrading-on-windows
  - set PATH=%APPDATA%\npm;%PATH%
  - npm config set cache C:\nc
  - npm install

# build version format
version: "{build}"

# Don't actually build.
build: off

test_script:
  - node --version
  - npm --version
  - cmd: npm test

matrix:
  fast_finish: true

skip_commits:
  files:
    - '**/*.md'

cache:
  - '%APPDATA%\npm\node_modules -> package.json'    # global npm modules
  - '%APPDATA%\npm-cache -> package.json'           # npm cache
  - 'node_modules -> package.json'                  # local npm modules
