# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

#trigger:
#- master

pool:
  vmImage: vs2017-win2016

strategy:
  maxParallel: 3
  matrix:
    node-10:
      node_version: ^10.14.1
    node-8:
      node_version: ^8.14.0
    node-6:
      node_version: ^6.15.1

steps:
  - task: NodeTool@0
    displayName: "Install node"
    inputs:
      versionSpec: $(node_version)
  - script: |
      npm install -g npm@latest
    displayName: "Install npm"
  - script: |
      npm ci
    displayName: "Install dependencies"
  - script: |
      npm run ci
    displayName: "Run tests"

variables:
  nproc: 4

# Node.js
# Build a general Node.js project with npm.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript

#trigger:
#- master

pool:
  vmImage: vs2017-win2016

strategy:
  maxParallel: 3
  matrix:
    node-10:
      node_version: ^10.14.1
    # node-8:
    #   node_version: ^8.14.0
    # node-6:
    #   node_version: ^6.15.1

steps:
  - task: NodeTool@0
    displayName: "Install node"
    inputs:
      versionSpec: $(node_version)
  - script: |
      npm install -g npm@latest
    displayName: "Install npm"
  - script: |
      npm install -g yarn@latest
    displayName: "Install yarn"
  - script: |
      npm ci
    displayName: "Install dependencies"
  - script: |
      npm config set loglevel warn
      git config --global user.email test@example.com
      git config --global user.name "Tester McPerson"
    displayName: "Configure test environment"
  - script: |
      npm run ci
    displayName: "Run tests"

variables:
  nproc: 4

Add yarn, configure git user, and limit to node 10
ci(azure): Add yarn, configure git user, and limit to node 10
