forked from typescript-eslint/typescript-eslint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
104 lines (87 loc) · 2.74 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
93
94
95
96
97
98
99
100
101
102
103
104
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: |
# Note that this command *also* typechecks tests/tools,
# whereas the build only checks src files
yarn typecheck
displayName: 'Typecheck all packages'
- script: |
yarn format-check
displayName: 'Check code formatting'
- script: |
yarn lint
displayName: 'Run linting'
- script: |
yarn check:docs
displayName: 'Validate documentation'
- script: |
yarn check:configs
displayName: 'Validate plugin configs'
- 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
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'