forked from typescript-eslint/typescript-eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
92 lines (78 loc) · 2.4 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
trigger:
- master
jobs:
- job: primary_code_validation_and_tests
displayName: Primary code validation and tests
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: 11
displayName: 'Install Node.js 11'
- script: |
# This also runs a build as part of the postinstall
# bootstrap
yarn --ignore-engines --frozen-lockfile
- script: |
yarn check-format
displayName: 'Check code formatting'
- script: |
yarn lint
displayName: 'Run linting'
- script: |
yarn test
displayName: 'Run unit tests'
- script: |
yarn integration-tests
displayName: 'Run integrations tests'
- script: |
npx codecov -t $(CODECOV_TOKEN)
displayName: 'Publish code coverage report'
- job: unit_tests_on_other_node_versions
displayName: Run unit tests on other Node.js versions
pool:
vmImage: 'Ubuntu-16.04'
strategy:
maxParallel: 3
matrix:
node_10_x:
node_version: 10.x
node_8_x:
node_version: 8.x
node_6_x:
node_version: 6.x
steps:
- task: NodeTool@0
inputs:
versionSpec: $(node_version)
displayName: 'Install Node.js $(node_version)'
- script: |
# This also runs a build as part of the postinstall
# bootstrap
yarn --ignore-engines --frozen-lockfile
- script: |
yarn test
displayName: 'Run unit tests'
- job: publish_canary_version
displayName: Publish the latest code as a canary version
dependsOn:
- primary_code_validation_and_tests
- unit_tests_on_other_node_versions
condition: and(succeeded(), eq(variables['Build.SourceBranchName'], 'master'), ne(variables['Build.Reason'], 'PullRequest'))
pool:
vmImage: 'Ubuntu-16.04'
steps:
- task: NodeTool@0
inputs:
versionSpec: 11
displayName: 'Install Node.js 11'
- script: |
# This also runs a build as part of the postinstall
# bootstrap
yarn --ignore-engines --frozen-lockfile
- script: |
npm config set //registry.npmjs.org/:_authToken=$(NPM_TOKEN)
- script: |
npx lerna publish --canary --exact --force-publish --yes
displayName: 'Publish all packages to npm'