|
4 | 4 | vmImage: ubuntu-16.04 |
5 | 5 | steps: |
6 | 6 | - task: NodeTool@0 |
7 | | - displayName: "Install Node.js" |
8 | 7 | inputs: |
9 | 8 | versionSpec: "^10.10.0" |
| 9 | + displayName: "Install Node.js" |
10 | 10 | - script: | |
11 | 11 | curl -o- -L https://yarnpkg.com/install.sh | bash |
12 | 12 | displayName: "Install Yarn" |
@@ -26,17 +26,32 @@ jobs: |
26 | 26 | - script: | |
27 | 27 | set -e |
28 | 28 | export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" |
29 | | - yarn test:basic --ci |
30 | | - yarn test:unit --ci |
| 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 |
31 | 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 | + |
32 | 47 | - job: lint |
33 | 48 | pool: |
34 | 49 | vmImage: ubuntu-16.04 |
35 | 50 | steps: |
36 | 51 | - task: NodeTool@0 |
37 | | - displayName: "Install Node.js" |
38 | 52 | inputs: |
39 | 53 | versionSpec: "^10.10.0" |
| 54 | + displayName: "Install Node.js" |
40 | 55 | - script: | |
41 | 56 | curl -o- -L https://yarnpkg.com/install.sh | bash |
42 | 57 | displayName: "Install Yarn" |
|
58 | 73 | export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" |
59 | 74 | yarn lint |
60 | 75 | displayName: "Run linting" |
61 | | - - job: linux |
| 76 | + - task: PublishTestResults@2 |
| 77 | + inputs: |
| 78 | + testRunTitle: "lint" |
| 79 | + testResultsFiles: "**/junit.xml" |
| 80 | + condition: succeededOrFailed() |
| 81 | + displayName: "Publish lint results" |
| 82 | + |
| 83 | + - job: Linux |
62 | 84 | dependsOn: |
63 | 85 | - basic |
64 | 86 | - lint |
|
75 | 97 | node_version: ^6.14.4 |
76 | 98 | steps: |
77 | 99 | - task: NodeTool@0 |
78 | | - displayName: "Install Node.js" |
79 | 100 | inputs: |
80 | 101 | versionSpec: $(node_version) |
| 102 | + displayName: "Install Node.js $(node_version)" |
81 | 103 | - script: | |
82 | 104 | curl -o- -L https://yarnpkg.com/install.sh | bash |
83 | 105 | displayName: "Install Yarn" |
@@ -98,9 +120,16 @@ jobs: |
98 | 120 | set -e |
99 | 121 | export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" |
100 | 122 | yarn cover:init |
101 | | - yarn cover:integration --ci --maxWorkers=2 |
| 123 | + yarn cover:integration --ci --maxWorkers=2 --reporters=jest-junit |
102 | 124 | displayName: "Run tests with coverage" |
103 | | - - job: macos |
| 125 | + - task: PublishTestResults@2 |
| 126 | + inputs: |
| 127 | + testRunTitle: "Linux with Node.js $(node_version)" |
| 128 | + testResultsFiles: "**/junit.xml" |
| 129 | + condition: succeededOrFailed() |
| 130 | + displayName: "Publish test results" |
| 131 | + |
| 132 | + - job: macOS |
104 | 133 | dependsOn: |
105 | 134 | - basic |
106 | 135 | - lint |
@@ -117,9 +146,9 @@ jobs: |
117 | 146 | node_version: ^6.14.4 |
118 | 147 | steps: |
119 | 148 | - task: NodeTool@0 |
120 | | - displayName: "Install Node.js" |
121 | 149 | inputs: |
122 | 150 | versionSpec: $(node_version) |
| 151 | + displayName: "Install Node.js $(node_version)" |
123 | 152 | - script: | |
124 | 153 | curl -o- -L https://yarnpkg.com/install.sh | bash |
125 | 154 | displayName: "Install Yarn" |
@@ -140,9 +169,16 @@ jobs: |
140 | 169 | set -e |
141 | 170 | export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH" |
142 | 171 | yarn cover:init |
143 | | - yarn cover:integration --ci |
| 172 | + yarn cover:integration --ci --reporters=jest-junit |
144 | 173 | displayName: "Run tests with coverage" |
145 | | - - job: windows |
| 174 | + - task: PublishTestResults@2 |
| 175 | + inputs: |
| 176 | + testRunTitle: "macOS with Node.js $(node_version)" |
| 177 | + testResultsFiles: "**/junit.xml" |
| 178 | + condition: succeededOrFailed() |
| 179 | + displayName: "Publish test results" |
| 180 | + |
| 181 | + - job: Windows |
146 | 182 | dependsOn: |
147 | 183 | - basic |
148 | 184 | - lint |
@@ -159,9 +195,9 @@ jobs: |
159 | 195 | node_version: ^6.14.4 |
160 | 196 | steps: |
161 | 197 | - task: NodeTool@0 |
162 | | - displayName: "Install Node.js" |
163 | 198 | inputs: |
164 | 199 | versionSpec: $(node_version) |
| 200 | + displayName: "Install Node.js $(node_version)" |
165 | 201 | - script: | |
166 | 202 | npm install --global yarn |
167 | 203 | displayName: "Install Yarn" |
@@ -178,5 +214,11 @@ jobs: |
178 | 214 | displayName: "Install dependencies" |
179 | 215 | - script: | |
180 | 216 | set -e |
181 | | - yarn cover:init && yarn cover:integration --ci --maxWorkers=2 |
| 217 | + yarn cover:init && yarn cover:integration --ci --maxWorkers=2 --reporters=jest-junit |
182 | 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" |