forked from microsoft/typed-rest-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
47 lines (43 loc) · 1.1 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
pool:
vmImage: ubuntu-20.04
parameters:
- name: versionSpec
type: object
default:
- '6.x'
- '8.x'
- '10.x'
- '12.x'
- '14.x'
- '16.x'
jobs:
- job: build_test_and_publish
displayName: Build, test and publish
steps:
#build on node 8.x
- task: NodeTool@0
inputs:
versionSpec: '8.x'
displayName: Install node
- script: npm install
displayName: npm install
- script: npm run build
displayName: npm run build
#run unit tests on different node versions
- ${{ each version in parameters.versionSpec }}:
- task: NodeTool@0
inputs:
versionSpec: ${{ version }}
displayName: Install node
- script: npm run units
displayName: npm run units
- script: npm run test
displayName: npm run test
#publish if needed
- task: PublishBuildArtifacts@1
condition: and(succeeded(), in(variables['publishBuild'], 'true'))
inputs:
PathtoPublish: "_build"
ArtifactName: "drop"
ArtifactType: "Container"
displayName: Publish build artifacts