-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathazure-pipelines-merge.yml
65 lines (53 loc) · 1.33 KB
/
azure-pipelines-merge.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
trigger:
batch: true
tags:
include:
- '2.*'
branches:
include:
- develop
pr: none
pool:
vmImage: ubuntu-latest
name: InnovationServiceTransactionalFrontend_$(SourceBranchName)_1.0.0_$(Date:yyyyMMdd)_$(Rev:.r)
variables:
ARTIFACT_NAME: transactional-app
steps:
- task: NodeTool@0
displayName: 'Install Node 20'
inputs:
versionSpec: '20.x'
- task: CmdLine@2
displayName: 'Install dependencies'
inputs:
script: |
npm install
- task: CmdLine@2
displayName: 'Run Lint'
inputs:
script: 'npm run lint'
- task: Npm@1
displayName: 'Run Tests'
inputs:
command: 'custom'
customCommand: 'test -- --ci --reporters=jest-junit --reporters=default --coverage --coverageReporters=cobertura'
- task: PublishTestResults@2
displayName: 'Publish Unit Tests Results'
inputs:
testResultsFiles: junit.xml
mergeTestResults: true
testRunTitle: 'Transactional Frontend Unit Test Results'
failTaskOnFailedTests: true
- task: PublishCodeCoverageResults@1
displayName: 'Publish Unit Tests Coverage'
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: coverage/cobertura-coverage.xml
- task: CmdLine@2
displayName: 'Run Build'
inputs:
script: 'npm run build:ssr'
- task: PublishPipelineArtifact@0
inputs:
artifactName: '$(ARTIFACT_NAME)'
targetPath: 'dist/'