Skip to content

Commit a50d743

Browse files
committed
chore(ci): xunit integration
1 parent a27604e commit a50d743

File tree

6 files changed

+22
-1
lines changed

6 files changed

+22
-1
lines changed

.evergreen/config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,12 +198,17 @@ functions:
198198
NODE_LTS_NAME=${NODE_LTS_NAME} DRIVERS_TOOLS="${DRIVERS_TOOLS}" \
199199
SSL_CA_FILE="${SSL_CA_FILE}" SSL_KEY_FILE="${SSL_KEY_FILE}" \
200200
MONGODB_URI="${MONGODB_URI}" bash ${PROJECT_DIRECTORY}/.evergreen/run-tls-tests.sh
201+
upload test results:
202+
- command: attach.xunit_results
203+
params:
204+
file: src/xunit.xml
201205
pre:
202206
- func: fetch source
203207
- func: prepare resources
204208
- func: fix absolute paths
205209
- func: make files executable
206210
post:
211+
- func: upload test results
207212
- func: cleanup
208213
tasks:
209214
- name: test-latest-server

.evergreen/config.yml.in

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ functions:
240240
SSL_CA_FILE="${SSL_CA_FILE}" SSL_KEY_FILE="${SSL_KEY_FILE}" \
241241
MONGODB_URI="${MONGODB_URI}" bash ${PROJECT_DIRECTORY}/.evergreen/run-tls-tests.sh
242242

243+
"upload test results":
244+
- command: attach.xunit_results
245+
params:
246+
file: src/xunit.xml
247+
243248
pre:
244249
- func: "fetch source"
245250
- func: "prepare resources"
@@ -248,4 +253,5 @@ pre:
248253
- func: "make files executable"
249254

250255
post:
256+
- func: "upload test results"
251257
- func: "cleanup"

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ manual_tests/
2929
docs/build
3030
docs/Makefile
3131

32+
# xunit test output for CI
33+
xunit.xml
34+
3235
# Directory for dbs
3336
db
3437

package-lock.json

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
"sinon": "^4.3.0",
5151
"sinon-chai": "^3.2.0",
5252
"snappy": "^6.3.4",
53+
"spec-xunit-file": "0.0.1-3",
5354
"standard-version": "^4.4.0",
5455
"util.promisify": "^1.0.1",
5556
"worker-farm": "^1.5.0",

test/mocha.opts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
--timeout 60000
33
--file test/tools/runner
44
--ui test/tools/runner/metadata_ui.js
5-
5+
--reporter spec-xunit-file

0 commit comments

Comments
 (0)