-
Notifications
You must be signed in to change notification settings - Fork 92
/
build.yml
81 lines (71 loc) · 2.13 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
# 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: item-counter
type: string
default: item-counter
- name: item-counter-spe
type: string
default: item-counter-spe
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 20.x
inputs:
version: 20.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: "ci"
- task: CmdLine@2
displayName: Build - ${{ parameter.Value }}
inputs:
script: "npm run build"
workingDirectory: ${{ parameter.Value }}
- task: CmdLine@2
displayName: Lint - ${{ parameter.Value }}
inputs:
script: "npm run lint"
workingDirectory: ${{ parameter.Value }}
- task: CmdLine@2
displayName: Test - ${{ parameter.Value }}
inputs:
script: "npm run ci:test"
workingDirectory: ${{ parameter.Value }}
- task: PublishTestResults@2
displayName: Publish Test Results - ${{ parameter.Value }}
inputs:
testResultsFormat: "JUnit"
testResultsFiles: "junit-report.xml"
searchFolder: ${{ parameter.Value }}/test-results
mergeTestResults: true
# Note while this runs if anything prior fails, the prior test steps won't
# run after first failure. Could be split into jobs to avoid interference.
condition: succeededOrFailed()