# Node.js # Build a general Node.js application with npm. # Add steps that analyze code, save build artifacts, deploy, and more: # https://docs.microsoft.com/vsts/pipelines/languages/javascript jobs: - job: Linux pool: vmImage: 'ubuntu-16.04' steps: - task: NodeTool@0 inputs: versionSpec: '8.x' displayName: 'Install Node.js' - script: | curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list sudo apt-get update && sudo apt-get install yarn sudo apt-get install --no-install-recommends yarn displayName: 'Install yarn' - script: | yarn install displayName: 'Install npm dependencies' - script: | yarn tsc displayName: 'Build' - script: | yarn mocha displayName: 'Test' - script: | yarn lint displayName: 'Lint' - script: | yarn test-coverage displayName: 'Generate and publish coverage' - job: macOS pool: vmImage: 'xcode9-macos10.13' steps: - task: NodeTool@0 inputs: versionSpec: '8.x' displayName: 'Install Node.js' - script: | yarn install displayName: 'Install yarn dependencies' - script: | yarn tsc displayName: 'Build' - script: | yarn mocha displayName: 'Test' - script: | yarn lint displayName: 'Lint' - job: Windows pool: vmImage: 'vs2017-win2016' steps: - task: NodeTool@0 inputs: versionSpec: '8.x' displayName: 'Install Node.js' - script: | yarn install displayName: 'Install yarn dependencies' - script: | yarn tsc displayName: 'Build' - script: | yarn mocha displayName: 'Test' - script: | yarn lint displayName: 'Lint'