-
Notifications
You must be signed in to change notification settings - Fork 2
/
test-and-pack.yaml
59 lines (49 loc) · 1.38 KB
/
test-and-pack.yaml
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
# Copyright (c) 2019-2020 Luca Cappa
# Released under the term specified in file LICENSE.txt
# SPDX short identifier: MIT
name: 0.9.$(rev:r)
pool:
name: Hosted Ubuntu 1604
demands: npm
variables:
system.debug: true
steps:
- checkout: self
submodules: recursive
- task: Npm@1
displayName: 'npm: install gulp and tfx-cli'
inputs:
command: custom
verbose: false
customCommand: 'install gulp@4 mocha tfx-cli@0.7.5'
- task: Npm@1
displayName: 'npm install'
inputs:
command: custom
verbose: true
customCommand: 'install'
- task: Npm@1
displayName: 'npm test tasks'
inputs:
command: custom
verbose: true
customCommand: 'run test'
- task: PublishTestResults@2
displayName: 'Publish Test Results **/test-*.xml'
condition: always()
inputs:
testResultsFiles: '**/test-*.xml'
searchFolder: '$(Build.SourcesDirectory)'
testRunTitle: 'Unit Tests'
- script: |
IFS='.' read -ra ADDR <<< "$BUILD_BUILDNUMBER"
echo "##vso[task.setvariable variable=MAJOR]${ADDR[0]}"
echo "##vso[task.setvariable variable=MINOR]${ADDR[1]}"
echo "##vso[task.setvariable variable=PATCH]${ADDR[2]}"
- script: 'npm run pack -- --override ''{ "version": "$(Build.BuildNumber)" }'''
displayName: "npm pack"
- task: PublishPipelineArtifact@0
displayName: "Publish vsix"
inputs:
artifactName: "vsix"
targetPath: "$(Build.SourcesDirectory)/vsix"