# Azure DevOps Pipeline for Node.js
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'

strategy:
  matrix:
    node_8_x:
      node_version: 8.x
    node_10_x:
      node_version: 10.x
    node_12_x:
      node_version: 12.x

steps:
- task: NodeTool@0
  inputs:
    versionSpec: $(node_version)
  displayName: 'Install Node.js'

- script: |
    npm install
    npm test
  displayName: 'npm install and test'

# Azure DevOps Pipeline for Node.js
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

strategy:
  matrix:
    linux_node_8:
      imageName: 'ubuntu-latest'
      node_version: 8.x
    linux_node_10:
      imageName: 'ubuntu-latest'
      node_version: 10.x
    linux_node_12:
      imageName: 'ubuntu-latest'
      node_version: 12.x
    macos_node_8:
      imageName: 'macos-latest'
      node_version: 8.x
    macos_node_10:
      imageName: 'macos-latest'
      node_version: 10.x
    macos_node_12:
      imageName: 'macos-latest'
      node_version: 12.x
    windows_node_8:
      imageName: 'windows-latest'
      node_version: 8.x
    windows_node_10:
      imageName: 'windows-latest'
      node_version: 10.x
    windows_node_12:
      imageName: 'windows-latest'
      node_version: 12.x

pool:
  vmImage: $(imageName)

steps:
- task: NodeTool@0
  inputs:
    versionSpec: $(node_version)
  displayName: 'Install Node.js'

- script: |
    npm install
    npm test
  displayName: 'npm install and test'

Update Azure DevOps Pipeline to run for all branches and Linux/Windows/macOS.
Update Azure DevOps Pipeline to run for all branches and Linux/Windows/macOS.