-
Notifications
You must be signed in to change notification settings - Fork 26
/
azure-pipelines.yml
69 lines (56 loc) · 1.58 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
65
66
67
68
69
# Node.js with Angular
# Build a Node.js project that uses Angular.
# Add steps that analyze code, save build artifacts, deploy, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/javascript
trigger:
- main
pool:
vmImage: 'ubuntu-latest'
steps:
- task: NodeTool@0
inputs:
versionSpec: '20.x'
displayName: 'Install Node.js'
- task: UseDotNet@2
displayName: 'Use .NET SDK 8.0.x'
inputs:
version: 8.0.x
- script: |
npm run dotnet:coverage
displayName: 'Install dotnet-coverage'
- script: |
npm ci
displayName: 'npm ci'
- script: |
npm run lint:all
displayName: 'Lint'
- script: |
npm run test:all
displayName: 'Run Tests'
- script: |
npm run build:prod
displayName: 'Build'
- task: PublishTestResults@2
displayName: 'Publish Test Results **/TESTS-*.xml'
inputs:
testResultsFiles: '**/TESTS-*.xml'
searchFolder: 'junit'
failTaskOnFailedTests: true
- task: PublishCodeCoverageResults@1
displayName: 'Publish Code Coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '**/cobertura-coverage.xml'
pathToSources: 'coverage'
failIfCoverageEmpty: false
- task: ArchiveFiles@2
inputs:
rootFolderOrFile: 'dist'
includeRootFolder: false
archiveType: 'zip'
archiveFile: '$(Build.ArtifactStagingDirectory)/$(Build.BuildId).zip'
replaceExistingArchive: true
- task: PublishBuildArtifacts@1
displayName: 'Publish Artifact'
inputs:
PathtoPublish: '$(build.artifactstagingdirectory)'