-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
73 lines (68 loc) · 1.8 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
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
variables:
- group: semantic-release
trigger:
- master
pr:
- master
jobs:
- job: commitlint
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: 10.x
displayName: Use Node.js 10
- script: npm ci
displayName: Install Dependencies
- script: ./node_modules/.bin/commitlint-azure-pipelines
displayName: Lint Commits
- job: test
strategy:
matrix:
node_8:
nodeVersion: 8.x
node_10:
nodeVersion: 10.x
node_11:
nodeVersion: 11.x
pool:
vmImage: 'ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: $(nodeVersion)
displayName: Use Node.js $(nodeVersion)
- script: npm ci
displayName: Install Dependencies
- script: npm run test-ci
displayName: Run Tests
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testRunner: JUnit
testResultsFiles: junit.xml
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: coverage/cobertura-coverage.xml
reportDirectory: coverage
- job: publish
dependsOn:
- commitlint
- test
pool:
vmImage: 'ubuntu-16.04'
condition: and(succeeded(), in(variables['Build.Reason'], 'Manual', 'IndividualCI', 'BatchedCI'), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
steps:
- task: NodeTool@0
inputs:
versionSpec: 10.x
displayName: Use Node.js 10
- script: npm ci
displayName: Install Dependencies
- script: npm run release
env:
GH_TOKEN: $(GH_TOKEN)
NPM_TOKEN: $(NPM_TOKEN)
displayName: Publish to NPM