forked from microsoft/FluidExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.yml
97 lines (87 loc) · 2.41 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License.
# FluidExamples build for CI and PR
pool:
vmImage: ubuntu-latest
parameters:
- name: angular-demo
type: string
default: angular-demo
- name: audience-demo
type: string
default: audience-demo
- name: brainstorm
type: string
default: brainstorm
- name: collaborative-text-area
type: string
default: collaborative-text-area
- name: multi-framework-diceroller
type: string
default: multi-framework-diceroller
- name: react-demo
type: string
default: react-demo
- name: node-demo
type: string
default: node-demo
- name: react-starter-template
type: string
default: react-starter-template
schedules:
- cron: "0 16 * * 1-5" # Runs daily builds at 9AM PST Mon-Fri
displayName: Daily builds
branches:
include:
- main
always: true
trigger:
- main
pr:
- main
variables:
skipComponentGovernanceDetection: true
steps:
- task: ComponentGovernanceComponentDetection@0
inputs:
scanType: "Register"
verbosity: "Verbose"
alertWarningLevel: "High"
- task: UseNode@1
displayName: Use Node 14.x
inputs:
version: 14.x
# Install, build, lint, and test each package
- ${{ 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: Lint - ${{ parameter.Value }}
inputs:
command: "custom"
workingDir: ${{ parameter.Value }}
customCommand: "run lint"
- task: Npm@1
displayName: Test - ${{ parameter.Value }}
inputs:
command: "custom"
workingDir: ${{ parameter.Value }}
customCommand: "run ci:test"
- task: PublishTestResults@2
displayName: Publish Test Results - ${{ parameter.Value }}
inputs:
testResultsFormat: "JUnit"
testResultsFiles: "**/*junit-report.xml"
searchFolder: ${{ parameter.Value }}/nyc
mergeTestResults: true
condition: succeededOrFailed()