diff --git a/.evergreen/config.in.yml b/.evergreen/config.in.yml index a35a16a103..e1977a6873 100644 --- a/.evergreen/config.in.yml +++ b/.evergreen/config.in.yml @@ -674,9 +674,7 @@ functions: # compression tests. aws s3 cp --recursive s3://mciuploads/mongo-node-driver/${revision}/${version_id}/ \ coverage/ \ - --exclude "results.*.json" \ - --exclude "*rhel80-large*" \ - --include "*fermiun" + --exclude "results.*.json" # npx does not recognize the dependency so install it directly. npm install @istanbuljs/nyc-config-typescript @@ -1066,6 +1064,7 @@ task_groups: binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/teardown.sh + - func: "upload coverage report" tasks: - test-gcpkms-task @@ -1093,6 +1092,7 @@ task_groups: binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/teardown.sh + - func: "upload coverage report" tasks: - test-azurekms-task @@ -1107,7 +1107,8 @@ task_groups: binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh - teardown_task: + teardown_group: + - func: "upload coverage report" - command: subprocess.exec params: binary: bash @@ -1129,7 +1130,8 @@ task_groups: binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh - teardown_task: + teardown_group: + - func: "upload coverage report" - command: subprocess.exec params: binary: bash @@ -1151,7 +1153,8 @@ task_groups: binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh - teardown_task: + teardown_group: + - func: "upload coverage report" - command: subprocess.exec params: binary: bash @@ -1177,6 +1180,8 @@ task_groups: MONGODB_VERSION: "8.0" args: - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/setup.sh + teardown_task: + - func: "upload coverage report" setup_group_can_fail_task: true setup_group_timeout_secs: 1800 tasks: @@ -1193,13 +1198,14 @@ task_groups: ${PREPARE_SHELL} export AZUREOIDC_VMNAME_PREFIX="NODE_DRIVER" $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/setup.sh - teardown_task: + teardown_group: - command: shell.exec params: shell: bash script: |- ${PREPARE_SHELL} $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/teardown.sh + - func: "upload coverage report" setup_group_can_fail_task: true setup_group_timeout_secs: 1800 tasks: @@ -1216,13 +1222,14 @@ task_groups: ${PREPARE_SHELL} export GCPOIDC_VMNAME_PREFIX="NODE_DRIVER" $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/setup.sh - teardown_task: + teardown_group: - command: shell.exec params: shell: bash script: |- ${PREPARE_SHELL} $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/teardown.sh + - func: "upload coverage report" setup_group_can_fail_task: true setup_group_timeout_secs: 1800 tasks: @@ -1245,13 +1252,14 @@ task_groups: - command: expansions.update params: file: src/atlas-expansion.yml - teardown_task: + teardown_group: - command: subprocess.exec params: working_dir: src binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/atlas/teardown-atlas-cluster.sh + - func: "upload coverage report" setup_group_can_fail_task: true setup_group_timeout_secs: 1800 tasks: @@ -1272,13 +1280,14 @@ task_groups: - command: expansions.update params: file: src/atlas-expansion.yml - teardown_task: + teardown_group: - command: subprocess.exec params: working_dir: src binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/atlas/teardown-atlas-cluster.sh + - func: "upload coverage report" setup_group_can_fail_task: true setup_group_timeout_secs: 1800 tasks: diff --git a/.evergreen/config.yml b/.evergreen/config.yml index 0724b65f06..c13ae8910c 100644 --- a/.evergreen/config.yml +++ b/.evergreen/config.yml @@ -600,9 +600,7 @@ functions: # compression tests. aws s3 cp --recursive s3://mciuploads/mongo-node-driver/${revision}/${version_id}/ \ coverage/ \ - --exclude "results.*.json" \ - --exclude "*rhel80-large*" \ - --include "*fermiun" + --exclude "results.*.json" # npx does not recognize the dependency so install it directly. npm install @istanbuljs/nyc-config-typescript @@ -2926,6 +2924,7 @@ task_groups: binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/csfle/gcpkms/teardown.sh + - func: upload coverage report tasks: - test-gcpkms-task - name: test_azurekms_task_group @@ -2950,6 +2949,7 @@ task_groups: binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/csfle/azurekms/teardown.sh + - func: upload coverage report tasks: - test-azurekms-task - name: testk8soidc_task_group_eks @@ -2963,7 +2963,8 @@ task_groups: binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh - teardown_task: + teardown_group: + - func: upload coverage report - command: subprocess.exec params: binary: bash @@ -2984,7 +2985,8 @@ task_groups: binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh - teardown_task: + teardown_group: + - func: upload coverage report - command: subprocess.exec params: binary: bash @@ -3005,7 +3007,8 @@ task_groups: binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/k8s/setup.sh - teardown_task: + teardown_group: + - func: upload coverage report - command: subprocess.exec params: binary: bash @@ -3032,6 +3035,8 @@ task_groups: MONGODB_VERSION: '8.0' args: - ${DRIVERS_TOOLS}/.evergreen/auth_oidc/setup.sh + teardown_task: + - func: upload coverage report setup_group_can_fail_task: true setup_group_timeout_secs: 1800 tasks: @@ -3047,13 +3052,14 @@ task_groups: ${PREPARE_SHELL} export AZUREOIDC_VMNAME_PREFIX="NODE_DRIVER" $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/setup.sh - teardown_task: + teardown_group: - command: shell.exec params: shell: bash script: |- ${PREPARE_SHELL} $DRIVERS_TOOLS/.evergreen/auth_oidc/azure/teardown.sh + - func: upload coverage report setup_group_can_fail_task: true setup_group_timeout_secs: 1800 tasks: @@ -3069,13 +3075,14 @@ task_groups: ${PREPARE_SHELL} export GCPOIDC_VMNAME_PREFIX="NODE_DRIVER" $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/setup.sh - teardown_task: + teardown_group: - command: shell.exec params: shell: bash script: |- ${PREPARE_SHELL} $DRIVERS_TOOLS/.evergreen/auth_oidc/gcp/teardown.sh + - func: upload coverage report setup_group_can_fail_task: true setup_group_timeout_secs: 1800 tasks: @@ -3097,13 +3104,14 @@ task_groups: - command: expansions.update params: file: src/atlas-expansion.yml - teardown_task: + teardown_group: - command: subprocess.exec params: working_dir: src binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/atlas/teardown-atlas-cluster.sh + - func: upload coverage report setup_group_can_fail_task: true setup_group_timeout_secs: 1800 tasks: @@ -3123,13 +3131,14 @@ task_groups: - command: expansions.update params: file: src/atlas-expansion.yml - teardown_task: + teardown_group: - command: subprocess.exec params: working_dir: src binary: bash args: - ${DRIVERS_TOOLS}/.evergreen/atlas/teardown-atlas-cluster.sh + - func: upload coverage report setup_group_can_fail_task: true setup_group_timeout_secs: 1800 tasks: diff --git a/package.json b/package.json index 3892967023..f3c4583298 100644 --- a/package.json +++ b/package.json @@ -131,8 +131,8 @@ "check:bench": "npm --prefix test/benchmarks/driver_bench start", "check:coverage": "nyc npm run test:all", "check:integration-coverage": "nyc npm run check:test", - "check:lambda": "mocha --config test/mocha_lambda.js test/integration/node-specific/examples/handler.test.js", - "check:lambda:aws": "mocha --config test/mocha_lambda.js test/integration/node-specific/examples/aws_handler.test.js", + "check:lambda": "nyc mocha --config test/mocha_lambda.js test/integration/node-specific/examples/handler.test.js", + "check:lambda:aws": "nyc mocha --config test/mocha_lambda.js test/integration/node-specific/examples/aws_handler.test.js", "check:lint": "npm run build:dts && npm run check:dts && npm run check:eslint && npm run check:tsd", "check:eslint": "npm run build:dts && ESLINT_USE_FLAT_CONFIG=false eslint -v && ESLINT_USE_FLAT_CONFIG=false eslint --max-warnings=0 --ext '.js,.ts' src test", "check:tsd": "tsd --version && tsd", @@ -140,25 +140,25 @@ "check:dts": "node ./node_modules/typescript/bin/tsc --noEmit mongodb.d.ts && tsd", "check:search-indexes": "nyc mocha --config test/mocha_mongodb.js test/manual/search-index-management.prose.test.ts", "check:test": "mocha --config test/mocha_mongodb.js test/integration", - "check:unit": "mocha test/unit", + "check:unit": "nyc mocha test/unit", "check:ts": "node ./node_modules/typescript/bin/tsc -v && node ./node_modules/typescript/bin/tsc --noEmit", - "check:atlas": "mocha --config test/manual/mocharc.js test/manual/atlas_connectivity.test.ts", - "check:resource-management": "mocha --config test/manual/mocharc.js test/manual/resource_management.test.ts", - "check:drivers-atlas-testing": "mocha --config test/mocha_mongodb.js test/atlas/drivers_atlas_testing.test.ts", - "check:adl": "mocha --config test/mocha_mongodb.js test/manual/atlas-data-lake-testing", + "check:atlas": "nyc mocha --config test/manual/mocharc.js test/manual/atlas_connectivity.test.ts", + "check:resource-management": "nyc mocha --config test/manual/mocharc.js test/manual/resource_management.test.ts", + "check:drivers-atlas-testing": "nyc mocha --config test/mocha_mongodb.js test/atlas/drivers_atlas_testing.test.ts", + "check:adl": "nyc mocha --config test/mocha_mongodb.js test/manual/atlas-data-lake-testing", "check:aws": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_aws.test.ts", - "check:oidc-auth": "mocha --config test/mocha_mongodb.js test/integration/auth/auth.spec.test.ts", - "check:oidc-test": "mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc.prose.test.ts", - "check:oidc-azure": "mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_azure.prose.05.test.ts", - "check:oidc-gcp": "mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_gcp.prose.06.test.ts", - "check:oidc-k8s": "mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_k8s.prose.07.test.ts", + "check:oidc-auth": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/auth.spec.test.ts", + "check:oidc-test": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc.prose.test.ts", + "check:oidc-azure": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_azure.prose.05.test.ts", + "check:oidc-gcp": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_gcp.prose.06.test.ts", + "check:oidc-k8s": "nyc mocha --config test/mocha_mongodb.js test/integration/auth/mongodb_oidc_k8s.prose.07.test.ts", "check:kerberos": "nyc mocha --config test/manual/mocharc.js test/manual/kerberos.test.ts", - "check:tls": "mocha --config test/manual/mocharc.js test/manual/tls_support.test.ts", + "check:tls": "nyc mocha --config test/manual/mocharc.js test/manual/tls_support.test.ts", "check:ldap": "nyc mocha --config test/manual/mocharc.js test/manual/ldap.test.ts", - "check:socks5": "mocha --config test/manual/mocharc.js test/manual/socks5.test.ts", - "check:csfle": "mocha --config test/mocha_mongodb.js test/integration/client-side-encryption", - "check:snappy": "mocha test/unit/assorted/snappy.test.js", - "check:x509": "mocha test/manual/x509_auth.test.ts", + "check:socks5": "nyc mocha --config test/manual/mocharc.js test/manual/socks5.test.ts", + "check:csfle": "nyc mocha --config test/mocha_mongodb.js test/integration/client-side-encryption", + "check:snappy": "nyc mocha test/unit/assorted/snappy.test.js", + "check:x509": "nyc mocha test/manual/x509_auth.test.ts", "fix:eslint": "npm run check:eslint -- --fix", "prepare": "node etc/prepare.js", "preview:docs": "ts-node etc/docs/preview.ts",