environment:
  matrix:
    - nodejs_version: 6.2
    - nodejs_version: 6.3
    # --inspect crashes in .4 and .5. https://github.com/nodejs/node/issues/8155
    - nodejs_version: 6.6
    - nodejs_version: 6.7
    - nodejs_version: 6.8
    - nodejs_version: 6.9
    - nodejs_version: 6.10
    - nodejs_version: 7.0
    - nodejs_version: 7.1
    - nodejs_version: 7.2
    - nodejs_version: 7.3
    - nodejs_version: 7.4
    - nodejs_version: 7.5
    - nodejs_version: 7.6
    - nodejs_version: 7.7.4
    - nodejs_version: 7.8.0

matrix:
  allow_failures:
    - nodejs_version: 6.2
    - nodejs_version: 6.3
    - nodejs_version: 6.6
    - nodejs_version: 6.7

install:
  - ps: >
      if ($env:nodejs_version -eq 6.2) {
        Install-Product node $env:nodejs_version x64
        npm i -g node-nightly
        node-nightly
      } else {
        # --inspect crashes in x64 https://github.com/nodejs/node/issues/8155
        Install-Product node $env:nodejs_version x86
      }

build_script:
  - npm install
  - npm run build

test_script:
  - npm test