UNPKG

6.34 kBYAMLView Raw
1trigger:
2 - master
3 - next
4
5variables:
6 npm_config_cache: $(Pipeline.Workspace)/.npm
7
8jobs:
9 - job: Lint
10 pool:
11 vmImage: ubuntu-latest
12 steps:
13 - task: NodeTool@0
14 inputs:
15 versionSpec: ^10.13.0
16 displayName: 'Install Node.js'
17 - task: Npm@1
18 inputs:
19 command: custom
20 customCommand: i -g npm@latest
21 displayName: 'Install latest NPM'
22 - script: |
23 node -v
24 npm -v
25 displayName: 'Print versions'
26 - task: CacheBeta@1
27 inputs:
28 key: npm | $(Agent.OS) | package-lock.json
29 path: $(npm_config_cache)
30 displayName: 'Cache npm'
31 - script: npm ci
32 displayName: 'Install dependencies'
33 - script: npm run lint
34 displayName: 'Run lint'
35 - script: npm run security
36 displayName: 'Run NPM audit'
37 - script: ./node_modules/.bin/commitlint-azure-pipelines
38 displayName: 'Run lint commit message'
39
40 - job: Linux
41 pool:
42 vmImage: ubuntu-latest
43 strategy:
44 maxParallel: 4
45 matrix:
46 node-13:
47 node_version: ^13.0.0
48 webpack_version: latest
49 node-12:
50 node_version: ^12.0.0
51 webpack_version: latest
52 node-10:
53 node_version: ^10.13.0
54 webpack_version: latest
55 node-10-canary:
56 node_version: ^10.13.0
57 webpack_version: next
58 steps:
59 - task: NodeTool@0
60 inputs:
61 versionSpec: $(node_version)
62 displayName: 'Install Node.js $(node_version)'
63 - task: Npm@1
64 inputs:
65 command: custom
66 customCommand: i -g npm@latest
67 displayName: 'Install latest NPM'
68 - script: |
69 node -v
70 npm -v
71 displayName: 'Print versions'
72 - task: CacheBeta@1
73 inputs:
74 key: npm | $(Agent.OS) | package-lock.json
75 path: $(npm_config_cache)
76 displayName: 'Cache npm'
77 - script: npm ci
78 displayName: 'Install dependencies'
79 - script: npm i webpack@$(webpack_version)
80 displayName: 'Install "webpack@$(webpack_version)"'
81 - script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit" || $(continue_on_error)
82 displayName: 'Run tests with coverage'
83 - task: PublishTestResults@2
84 inputs:
85 testRunTitle: 'Linux with Node.js $(node_version)'
86 testResultsFiles: '**/junit.xml'
87 condition: succeededOrFailed()
88 displayName: 'Publish test results'
89 - script: curl -s https://codecov.io/bash | bash -s -- -t $(CODECOV_TOKEN)
90 condition: succeededOrFailed()
91 displayName: 'Submit coverage data to codecov'
92
93 - job: macOS
94 pool:
95 vmImage: macOS-latest
96 strategy:
97 maxParallel: 4
98 matrix:
99 node-13:
100 node_version: ^13.0.0
101 webpack_version: latest
102 node-12:
103 node_version: ^12.0.0
104 webpack_version: latest
105 node-10:
106 node_version: ^10.13.0
107 webpack_version: latest
108 node-10-canary:
109 node_version: ^10.13.0
110 webpack_version: next
111 steps:
112 - task: NodeTool@0
113 inputs:
114 versionSpec: $(node_version)
115 displayName: 'Install Node.js $(node_version)'
116 - task: Npm@1
117 inputs:
118 command: custom
119 customCommand: i -g npm@latest
120 displayName: 'Install latest NPM'
121 - script: |
122 node -v
123 npm -v
124 displayName: 'Print versions'
125 - task: CacheBeta@1
126 inputs:
127 key: npm | $(Agent.OS) | package-lock.json
128 path: $(npm_config_cache)
129 displayName: 'Cache npm'
130 - script: npm ci
131 displayName: 'Install dependencies'
132 - script: npm i webpack@$(webpack_version)
133 displayName: 'Install "webpack@$(webpack_version)"'
134 - script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit" || $(continue_on_error)
135 displayName: 'Run tests with coverage'
136 - task: PublishTestResults@2
137 inputs:
138 testRunTitle: 'Linux with Node.js $(node_version)'
139 testResultsFiles: '**/junit.xml'
140 condition: succeededOrFailed()
141 displayName: 'Publish test results'
142 - script: curl -s https://codecov.io/bash | bash -s -- -t $(CODECOV_TOKEN)
143 condition: succeededOrFailed()
144 displayName: 'Submit coverage data to codecov'
145
146 - job: Windows
147 pool:
148 vmImage: windows-latest
149 strategy:
150 maxParallel: 4
151 matrix:
152 node-13:
153 node_version: ^13.0.0
154 webpack_version: latest
155 node-12:
156 node_version: ^12.0.0
157 webpack_version: latest
158 node-10:
159 node_version: ^10.13.0
160 webpack_version: latest
161 node-10-canary:
162 node_version: ^10.13.0
163 webpack_version: next
164 steps:
165 - script: 'git config --global core.autocrlf input'
166 displayName: 'Config git core.autocrlf'
167 - checkout: self
168 - task: NodeTool@0
169 inputs:
170 versionSpec: $(node_version)
171 displayName: 'Install Node.js $(node_version)'
172 - task: Npm@1
173 inputs:
174 command: custom
175 customCommand: i -g npm@latest
176 displayName: 'Install latest NPM'
177 - script: |
178 node -v
179 npm -v
180 displayName: 'Print versions'
181 - task: CacheBeta@1
182 inputs:
183 key: npm | $(Agent.OS) | package-lock.json
184 path: $(npm_config_cache)
185 displayName: 'Cache npm'
186 - script: npm ci
187 displayName: 'Install dependencies'
188 - script: npm i webpack@$(webpack_version)
189 displayName: 'Install "webpack@$(webpack_version)"'
190 - script: npm run test:coverage -- --ci --reporters="default" --reporters="jest-junit" || $(continue_on_error)
191 displayName: 'Run tests with coverage'
192 - task: PublishTestResults@2
193 inputs:
194 testRunTitle: 'Linux with Node.js $(node_version)'
195 testResultsFiles: '**/junit.xml'
196 condition: succeededOrFailed()
197 displayName: 'Publish test results'
198 - script: curl -s https://codecov.io/bash | bash -s -- -t $(CODECOV_TOKEN)
199 condition: succeededOrFailed()
200 displayName: 'Submit coverage data to codecov'