-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
64 lines (53 loc) · 1.51 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# This is the Azure Pipelines configuration for the relabeler project. IT IS NOT ACTIVATED.
trigger:
branches:
include:
- main
paths:
include:
- src/*
- package.json
pr:
- main
pool:
vmImage: "ubuntu-latest"
steps:
- task: NodeTool@0
inputs:
versionSpec: "20.x"
displayName: "Install Node.js"
- script: |
npm install
displayName: "npm install"
- script: |
npm run build
displayName: "npm build"
- script: |
npm test
displayName: "npm test and coverage"
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFormat: "JUnit"
testResultsFiles: "**/TEST-*.xml"
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: "Cobertura" # cSpell: ignore Cobertura
summaryFileLocation: "$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml"
- task: PublishPipelineArtifact@1
inputs:
targetPath: "$(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml"
artifact: "coverage-report"
publishLocation: "pipeline"
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: "$(System.DefaultWorkingDirectory)/dist"
includeRootFolder: false
archiveType: "zip"
archiveFile: "$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip"
replaceExistingArchive: true
- task: PublishPipelineArtifact@1
inputs:
targetPath: "$(Build.ArtifactStagingDirectory)"
artifact: "build-artifact"
publishLocation: "pipeline"