Skip to content

Commit 3245fa1

Browse files
authored
test(NODE-4586): optional callback async wrappers (#2)
1 parent d59a002 commit 3245fa1

24 files changed

+3957
-161
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
build:
11-
10+
check:
1211
runs-on: ubuntu-latest
13-
1412
steps:
1513
- uses: actions/checkout@v3
1614
- name: Use Node.js LTS

.github/workflows/test.yml

Lines changed: 31 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: unit tests
1+
name: unit
22

33
on:
44
push:
@@ -7,24 +7,46 @@ on:
77
branches: [ main ]
88

99
jobs:
10-
build:
11-
10+
test:
1211
runs-on: ubuntu-latest
13-
1412
strategy:
1513
matrix:
1614
node-version: [12.x, 14.x, 16.x, 18.x]
17-
driver-version: [ 'current', 'latest' ]
18-
1915
steps:
2016
- uses: actions/checkout@v3
2117
- name: Use Node.js ${{ matrix.node-version }}
2218
uses: actions/setup-node@v3
2319
with:
2420
node-version: ${{ matrix.node-version }}
2521
- run: npm clean-install
22+
- run: npm run check:test
2623

27-
- if: ${{ matrix.driver-version == 'latest' }}
28-
run: npm install --no-save mongodb/node-mongodb-native#main
29-
24+
test-latest-driver:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/checkout@v3
28+
- name: Use Node.js LTS
29+
uses: actions/setup-node@v3
30+
with:
31+
node-version: lts/*
32+
- run: npm clean-install
33+
- run: npm install --no-save mongodb/node-mongodb-native#main
3034
- run: npm run check:test
35+
36+
coverage:
37+
runs-on: ubuntu-latest
38+
steps:
39+
- uses: actions/checkout@v3
40+
- name: Use Node.js LTS
41+
uses: actions/setup-node@v3
42+
with:
43+
node-version: lts/*
44+
- run: npm clean-install
45+
- run: npm run check:coverage
46+
- name: code coverage results
47+
if: success() || failure()
48+
uses: actions/upload-artifact@v3
49+
with:
50+
name: code-coverage-report
51+
path: coverage
52+
retention-days: 1

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,6 @@ node_modules/
33
.vscode/
44
*.tgz
55
etc/node-mongodb-native
6+
.nyc_output/
7+
coverage/
8+
.DS_Store

.nycrc.json

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"include": [
3+
"src/**/*"
4+
],
5+
"reporter": [
6+
"lcovonly",
7+
"html",
8+
"text-summary"
9+
],
10+
"functions": 100,
11+
"lines": 100,
12+
"statements": 100,
13+
"branches": 100
14+
}

0 commit comments

Comments
 (0)