image:
  - Visual Studio 2015
  - Ubuntu

environment:
  matrix:
    # node.js
    - nodejs: "14"
    - nodejs: "13"
    - nodejs: "12"
    - nodejs: "11"
    - nodejs: "10"

install:
  - cmd: powershell Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs) x64
  - sh: sudo apt-get -qq update
  - sh: sudo apt-get -y -qq install build-essential libgconf-2-4 python libglib2.0-dev
  - sh: nvm install $nodejs
  - node -p "[process.version,process.arch].join(' ')"
  - dotnet --version
  - npm install -q
  - cmd: npm i -q  xunit-viewer >nul
  - sh: npm i xunit-viewer --silent &> /dev/null

test_script:

  - cmd: npm test
  - cmd: node tools/coverage.js
  - cmd: SET EDGE_USE_CORECLR=1 & npm test
  - cmd: SET EDGE_USE_CORECLR=1 & node tools/coverage.js
  - sh: EDGE_USE_CORECLR=1 npm test
  - sh: EDGE_USE_CORECLR=1 node tools/coverage.js

after_test:
  - ps: |
      $url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
      $file = '.\test-results.xml'
      (New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path '.\test-results.xml'))
      Push-AppveyorArtifact (Resolve-Path '.\test-results.xml')
      Push-AppveyorArtifact (Resolve-Path '.\test-results-xunit-viewer.xml')
      Push-AppveyorArtifact (Resolve-Path '.\test-results-xunit-viewer.html')

skip_commits:
  files:
    - samples/*
    - stress/*
    - performance/*
    - '**/*.md'
    - '**/*.d.ts'
    - '**/*.bat'
    - '.travis.yml'
    - 'Dockerfile'

build: off