forked from amilajack/eslint-plugin-compat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
116 lines (113 loc) · 4.09 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
105
106
107
108
109
110
111
112
113
114
115
116
variables:
YARN_CACHE_FOLDER: $(Pipeline.Workspace)/.yarn
stableNodeVersion: "12.x"
currentNodeVersion: "14.x"
# Used with `eslintVersion` to see if `spec:e2e` and `benchmarks` should run
e2eEslintVersion: "eslint@7"
strategy:
matrix:
linux_node_stable_eslint5:
imageName: "ubuntu-16.04"
nodeVersion: $(stableNodeVersion)
eslintVersion: "eslint@^5"
linux_node_stable_eslint6:
imageName: "ubuntu-16.04"
nodeVersion: $(stableNodeVersion)
eslintVersion: "eslint@^6"
linux_node_stable_eslint7:
imageName: "ubuntu-16.04"
nodeVersion: $(stableNodeVersion)
eslintVersion: "[email protected]"
linux_node_current_eslint5:
imageName: "ubuntu-16.04"
nodeVersion: $(currentNodeVersion)
eslintVersion: "eslint@^5"
linux_node_current_eslint6:
imageName: "ubuntu-16.04"
nodeVersion: $(currentNodeVersion)
eslintVersion: "eslint@^6"
linux_node_current_eslint7:
imageName: "ubuntu-16.04"
nodeVersion: $(currentNodeVersion)
eslintVersion: "[email protected]"
mac_node_stable_eslint5:
imageName: "macos-10.14"
nodeVersion: $(stableNodeVersion)
eslintVersion: "eslint@^5"
mac_node_stable_eslint6:
imageName: "macos-10.14"
nodeVersion: $(stableNodeVersion)
eslintVersion: "eslint@^6"
mac_node_stable_eslint7:
imageName: "macos-10.14"
nodeVersion: $(stableNodeVersion)
eslintVersion: "[email protected]"
mac_node_current_eslint5:
imageName: "macos-10.14"
nodeVersion: $(currentNodeVersion)
eslintVersion: "eslint@^5"
mac_node_current_eslint6:
imageName: "macos-10.14"
nodeVersion: $(currentNodeVersion)
eslintVersion: "eslint@^6"
mac_node_current_eslint7:
imageName: "macos-10.14"
nodeVersion: $(currentNodeVersion)
eslintVersion: "[email protected]"
windows_node_stable_eslint5:
imageName: "vs2017-win2016"
nodeVersion: $(stableNodeVersion)
eslintVersion: "eslint@^5"
windows_node_stable_eslint6:
imageName: "vs2017-win2016"
nodeVersion: $(stableNodeVersion)
eslintVersion: "eslint@^6"
windows_node_stable_eslint7:
imageName: "vs2017-win2016"
nodeVersion: $(stableNodeVersion)
eslintVersion: "[email protected]"
windows_node_current_eslint5:
imageName: "vs2017-win2016"
nodeVersion: $(currentNodeVersion)
eslintVersion: "eslint@^5"
windows_node_current_eslint6:
imageName: "vs2017-win2016"
nodeVersion: $(currentNodeVersion)
eslintVersion: "eslint@^6"
windows_node_current_eslint7:
imageName: "vs2017-win2016"
nodeVersion: $(currentNodeVersion)
eslintVersion: "[email protected]"
pool:
vmImage: $(imageName)
steps:
- task: NodeTool@0
inputs:
versionSpec: $(nodeVersion)
displayName: Install node@$(nodeVersion)
- task: Cache@2
inputs:
key: 'yarn | "$(Agent.OS)" | yarn.lock'
restoreKeys: |
yarn | "$(Agent.OS)"
yarn
path: $(YARN_CACHE_FOLDER)
displayName: Cache Yarn packages
- script: yarn --frozen-lockfile && yarn add --dev $(eslintVersion) && yarn test
displayName: Install dependencies and run yarn test
# E2E tests use eslint@7+ only feature (the Node.js API class ESLint)
# Also disabled on windows because of jest snapshot problems
- script: yarn spec:e2e
condition: and(contains(variables['eslintVersion'], variables['e2eEslintVersion']), ne(variables['imageName'], 'vs2017-win2016'))
displayName: Run yarn spec:e2e if $(eslintVersion) >= $(e2eEslintVersion)
# Benchmarks use eslint@7_ only feature (the Node.js API class ESLint)
- script: yarn benchmarks
condition: contains(variables['eslintVersion'], variables['e2eEslintVersion'])
displayName: Run yarn benchmarks if $(eslintVersion) >= $(e2eEslintVersion)
# Upload Jest code coverage
- script: yarn spec --coverage --coverageReporters=cobertura
displayName: Generate Jest coverage report
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: $(System.DefaultWorkingDirectory)/coverage/cobertura-coverage.xml