You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

azure-pipelines.yml 7.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228
  1. jobs:
  2. - job: basic
  3. pool:
  4. vmImage: ubuntu-16.04
  5. steps:
  6. - task: NodeTool@0
  7. inputs:
  8. versionSpec: "^10.10.0"
  9. displayName: "Install Node.js"
  10. - script: |
  11. curl -o- -L https://yarnpkg.com/install.sh | bash
  12. displayName: "Install Yarn"
  13. - script: |
  14. set -e
  15. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  16. node -v
  17. yarn -v
  18. displayName: "Print versions"
  19. - script: |
  20. set -e
  21. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  22. yarn --frozen-lockfile
  23. yarn link --frozen-lockfile || true
  24. yarn link webpack --frozen-lockfile
  25. displayName: "Install dependencies"
  26. - script: |
  27. set -e
  28. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  29. export JEST_JUNIT_OUTPUT=./basic-junit.xml
  30. yarn test:basic --ci --reporters=jest-junit
  31. export JEST_JUNIT_OUTPUT=./unit-junit.xml
  32. yarn test:unit --ci --reporters=jest-junit
  33. displayName: "Run basic tests"
  34. - task: PublishTestResults@2
  35. inputs:
  36. testRunTitle: "basic"
  37. testResultsFiles: "**/basic-junit.xml"
  38. condition: succeededOrFailed()
  39. displayName: "Publish basic test results"
  40. - task: PublishTestResults@2
  41. inputs:
  42. testRunTitle: "unit"
  43. testResultsFiles: "**/unit-junit.xml"
  44. condition: succeededOrFailed()
  45. displayName: "Publish unit test results"
  46. - job: lint
  47. pool:
  48. vmImage: ubuntu-16.04
  49. steps:
  50. - task: NodeTool@0
  51. inputs:
  52. versionSpec: "^10.10.0"
  53. displayName: "Install Node.js"
  54. - script: |
  55. curl -o- -L https://yarnpkg.com/install.sh | bash
  56. displayName: "Install Yarn"
  57. - script: |
  58. set -e
  59. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  60. node -v
  61. yarn -v
  62. displayName: "Print versions"
  63. - script: |
  64. set -e
  65. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  66. yarn --frozen-lockfile
  67. yarn link --frozen-lockfile || true
  68. yarn link webpack --frozen-lockfile
  69. displayName: "Install dependencies"
  70. - script: |
  71. set -e
  72. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  73. yarn -s run code-lint --format junit > junit.xml
  74. yarn jest-lint
  75. yarn type-lint
  76. yarn special-lint
  77. displayName: "Run linting"
  78. - task: PublishTestResults@2
  79. inputs:
  80. testRunTitle: "lint"
  81. testResultsFiles: "**/junit.xml"
  82. condition: succeededOrFailed()
  83. displayName: "Publish lint results"
  84. - job: Linux
  85. dependsOn:
  86. - basic
  87. - lint
  88. pool:
  89. vmImage: ubuntu-16.04
  90. strategy:
  91. maxParallel: 4
  92. matrix:
  93. node-12:
  94. node_version: ^12.2.0
  95. node-10:
  96. node_version: ^10.10.0
  97. node-8:
  98. node_version: ^8.12.0
  99. node-6:
  100. node_version: ^6.14.4
  101. steps:
  102. - task: NodeTool@0
  103. inputs:
  104. versionSpec: $(node_version)
  105. displayName: "Install Node.js $(node_version)"
  106. - script: |
  107. curl -o- -L https://yarnpkg.com/install.sh | bash
  108. displayName: "Install Yarn"
  109. - script: |
  110. set -e
  111. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  112. node -v
  113. yarn -v
  114. displayName: "Print versions"
  115. - script: |
  116. set -e
  117. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  118. yarn --frozen-lockfile
  119. yarn link --frozen-lockfile || true
  120. yarn link webpack --frozen-lockfile
  121. displayName: "Install dependencies"
  122. - script: |
  123. set -e
  124. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  125. yarn cover:integration --ci --maxWorkers=2 --reporters=jest-junit
  126. displayName: "Run tests with coverage"
  127. - task: PublishTestResults@2
  128. inputs:
  129. testRunTitle: "Linux with Node.js $(node_version)"
  130. testResultsFiles: "**/junit.xml"
  131. condition: succeededOrFailed()
  132. displayName: "Publish test results"
  133. - job: macOS
  134. dependsOn:
  135. - basic
  136. - lint
  137. pool:
  138. vmImage: "macOS 10.13"
  139. strategy:
  140. maxParallel: 4
  141. matrix:
  142. node-12:
  143. node_version: ^12.2.0
  144. node-10:
  145. node_version: ^10.10.0
  146. node-8:
  147. node_version: ^8.12.0
  148. node-6:
  149. node_version: ^6.14.4
  150. steps:
  151. - task: NodeTool@0
  152. inputs:
  153. versionSpec: $(node_version)
  154. displayName: "Install Node.js $(node_version)"
  155. - script: |
  156. curl -o- -L https://yarnpkg.com/install.sh | bash
  157. displayName: "Install Yarn"
  158. - script: |
  159. set -e
  160. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  161. node -v
  162. yarn -v
  163. displayName: "Print versions"
  164. - script: |
  165. set -e
  166. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  167. yarn --frozen-lockfile
  168. yarn link --frozen-lockfile || true
  169. yarn link webpack --frozen-lockfile
  170. displayName: "Install dependencies"
  171. - script: |
  172. set -e
  173. export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
  174. yarn cover:integration --ci --reporters=jest-junit
  175. displayName: "Run tests with coverage"
  176. - task: PublishTestResults@2
  177. inputs:
  178. testRunTitle: "macOS with Node.js $(node_version)"
  179. testResultsFiles: "**/junit.xml"
  180. condition: succeededOrFailed()
  181. displayName: "Publish test results"
  182. - job: Windows
  183. dependsOn:
  184. - basic
  185. - lint
  186. pool:
  187. vmImage: vs2017-win2016
  188. strategy:
  189. maxParallel: 4
  190. matrix:
  191. node-12:
  192. node_version: ^12.2.0
  193. node-10:
  194. node_version: ^10.10.0
  195. node-8:
  196. node_version: ^8.12.0
  197. node-6:
  198. node_version: ^6.14.4
  199. steps:
  200. - task: NodeTool@0
  201. inputs:
  202. versionSpec: $(node_version)
  203. displayName: "Install Node.js $(node_version)"
  204. - script: |
  205. npm install --global yarn
  206. displayName: "Install Yarn"
  207. - script: |
  208. node -v
  209. yarn -v
  210. displayName: "Print versions"
  211. - script: |
  212. yarn --frozen-lockfile
  213. yarn link --frozen-lockfile || true
  214. yarn link webpack --frozen-lockfile
  215. displayName: "Install dependencies"
  216. - script: |
  217. yarn cover:integration --ci --maxWorkers=2 --reporters=jest-junit
  218. displayName: "Run tests with coverage"
  219. - task: PublishTestResults@2
  220. inputs:
  221. testRunTitle: "Windows with Node.js $(node_version)"
  222. testResultsFiles: "**/junit.xml"
  223. condition: succeededOrFailed()
  224. displayName: "Publish test results"