diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 00000000..73a885f5 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,44 @@ +# 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: 'Ubuntu-16.04' +strategy: + matrix: + node_8_x: + node_version: 8.x + node_9_x: + node_version: 9.x + +steps: +- task: NodeTool@0 + inputs: + versionSpec: $(node_version) + displayName: 'Install Node.js' + +- script: npm install + displayName: 'npm install' +- script: npm test + displayName: 'run tests' +- script: npm build + displayName: 'run build' + +- task: PublishTestResults@2 + condition: succeededOrFailed() + inputs: + testRunner: JUnit + testResultsFiles: '**/test-results.xml' + +- task: ArchiveFiles@2 + inputs: + rootFolderOrFile: '$(System.DefaultWorkingDirectory)' + includeRootFolder: false + + - task: PublishBuildArtifacts@1 + inputs: + PathtoPublish: '$(System.DefaultWorkingDirectory)'