-
Notifications
You must be signed in to change notification settings - Fork 3
/
azure-pipelines.yml
73 lines (55 loc) · 1.5 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
jobs:
- job: test
displayName: 'Test'
pool:
vmImage: 'ubuntu-latest'
strategy:
matrix:
node_12_x:
node_version: 12.x
node_14_x:
node_version: 14.x
node_16_x:
node_version: 16.x
steps:
- template: azure-pipelines/install.yml
parameters:
nodeVersion: $(node_version)
- script: yarn lint:check
displayName: 'Linter check'
- script: yarn tsc
displayName: 'TypeScript check'
- template: azure-pipelines/test.yml
- job: coverage
displayName: 'Coverage'
pool:
vmImage: 'ubuntu-latest'
steps:
- template: azure-pipelines/install.yml
parameters:
nodeVersion: $(defaultNodeVersion)
- template: azure-pipelines/test.yml
- script: yarn upload-coverage
env:
CODECOV_TOKEN: $(CODECOV_TOKEN)
displayName: 'Upload coverage report'
- job: publish
displayName: 'Publish'
condition: and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master'))
dependsOn: test
pool:
vmImage: 'ubuntu-latest'
steps:
- template: azure-pipelines/install.yml
parameters:
nodeVersion: $(defaultNodeVersion)
- script: yarn build
displayName: 'Build'
- script: yarn semantic-release
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)
NPM_TOKEN: $(NPM_TOKEN)
displayName: 'Release'
variables:
CI: true
defaultNodeVersion: '16.3.0'