Skip to content

Commit

Permalink
[INTERNAL] Enable azure pipeline config for v2
Browse files Browse the repository at this point in the history
  • Loading branch information
flovogt committed Nov 7, 2022
1 parent 4a35452 commit 2a96e28
Showing 1 changed file with 58 additions and 0 deletions.
58 changes: 58 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# 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:
- v2

strategy:
matrix:
linux_node_lts_16:
imageName: 'ubuntu-20.04'
node_version: 16.x
linux_node_latest:
imageName: 'ubuntu-20.04'
node_version: 18.x
mac_node_latest:
imageName: 'macOS-11'
node_version: 18.x
windows_node_latest:
imageName: 'windows-2022'
node_version: 18.x

pool:
vmImage: $(imageName)

steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: Install Node.js

- script: npm ci
displayName: Install Dependencies

- script: npm ls --prod
displayName: Check for missing / extraneous Dependencies

- script: npm run test-azure
displayName: Run Tests

- task: PublishTestResults@2
displayName: Publish Test Results
condition: succeededOrFailed()
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '$(System.DefaultWorkingDirectory)/test-results.xml'

- task: PublishCodeCoverageResults@1
displayName: Publish Test Coverage Results
condition: succeededOrFailed()
inputs:
codeCoverageTool: 'cobertura'
summaryFileLocation: '$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml'

- script: npm run coverage
displayName: Run Test Natively in Case of Failures
condition: failed()

0 comments on commit 2a96e28

Please sign in to comment.