# http://www.appveyor.com/docs/appveyor-yml

# This image contains both 2013 and 2015
os: Visual Studio 2015

# Test against these versions of Node.js.
environment:
  matrix:
    - nodejs_version: "4"
      GYP_MSVS_VERSION: "2013"
    - nodejs_version: "4"
      GYP_MSVS_VERSION: "2015"
    - nodejs_version: "6"
      GYP_MSVS_VERSION: "2013"
    - nodejs_version: "6"
      GYP_MSVS_VERSION: "2015"
    - nodejs_version: "8"
      GYP_MSVS_VERSION: "2013"
    - nodejs_version: "8"
      GYP_MSVS_VERSION: "2015"
    - nodejs_version: "10"
      GYP_MSVS_VERSION: "2015"
    - nodejs_version: "12"
      GYP_MSVS_VERSION: "2015"

# Install scripts. (runs after repo cloning)
install:
  # Get the latest stable version of Node
  - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version)
  # Install AutoIt in order to automate installation of npcap
  - choco install -y autoit
  # Download and install latest npcap with WinPCap compatibility
  - start "" /WAIT autoit3 test\npcap-install.au3
  # Start build
  - set CL=-DDELAYIMP_INSECURE_WRITABLE_HOOKS
  - npm install

# Post-install test scripts.
test_script:
  # Output useful info for debugging.
  - node --version
  - npm --version
  # run tests
  - npm test

# Don't actually build.
build: off

# Set build version format here instead of in the admin panel.
version: "{build}"
