azure-pipelines.yml
# 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
strategy:
matrix:
linux:
imageName: "ubuntu-latest"
mac:
imageName: "macos-latest"
windows:
imageName: "windows-latest"
pool:
vmImage: $(imageName)
steps:
- task: NodeTool@0
inputs:
versionSpec: "10.x"
displayName: "Install Node.js"
- bash: |
/usr/bin/Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
echo ">>> Started xvfb"
displayName: Start xvfb
condition: and(succeeded(), eq(variables['Agent.OS'], 'Linux'))
- bash: |
npm install
echo ">>> Run sample integration test"
npm run test
displayName: Run Tests
env:
DISPLAY: ":99.0"