forked from microsoft/FluidExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.yml
70 lines (61 loc) · 1.59 KB
/
build.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
70
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# FluidExamples build for CI and PR
pool:
vmImage: ubuntu-latest
parameters:
- name: brainstorm
type: string
default: brainstorm
- name: react-starter-template
type: string
default: react-starter-template
- name: react-demo
type: string
default: react-demo
- name: multi-framework-diceroller
type: string
default: multi-framework-diceroller
trigger:
- main
pr:
- main
variables:
skipComponentGovernanceDetection: true
steps:
- task: ComponentGovernanceComponentDetection@0
inputs:
scanType: 'Register'
verbosity: 'Verbose'
alertWarningLevel: 'High'
- task: UseNode@1
displayName: Use Node 12.x
inputs:
version: 12.x
- ${{ each parameter in parameters }}:
- task: Npm@1
displayName: Install - ${{ parameter.Value }}
inputs:
command: 'custom'
workingDir: '${{ parameter.Value }}'
customCommand: 'install'
- task: Npm@1
displayName: Build - ${{ parameter.Value }}
inputs:
command: 'custom'
workingDir: ${{ parameter.Value }}
customCommand: 'run build'
- task: Npm@1
displayName: Test - ${{ parameter.Value }}
inputs:
command: 'custom'
workingDir: ${{ parameter.Value }}
customCommand: 'run test:report'
- task: PublishTestResults@2
displayName: Publish Test Results - ${{ parameter.Value }}
inputs:
testResultsFormat: 'JUnit'
testResultsFiles: '**/*junit-report.xml'
searchFolder: ${{ parameter.Value }}/nyc
mergeTestResults: true
condition: succeededOrFailed()