Skip to content
Merged
7 changes: 3 additions & 4 deletions .github/workflows/check-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,8 @@ jobs:
# Dependencies are included when installing as npm workspaces will
# hoist every package in the repo and it's important that the
# dependencies of packages we are planning to test are also prepared
npm ci
npm run bootstrap-ci -- --scope @mongodb-js/monorepo-tools --stream --include-dependencies
npm run bootstrap-ci -- --stream --since ${SINCE_REF} --include-dependencies
npm run bootstrap-ci -- --stream --include-dependencies

# saslprep source code may have been modified by bootstrapping,
# depending on the OS, so undo that change if it has happened
Expand All @@ -99,9 +98,9 @@ jobs:
# We exclude dependents when running eslint and depchecks because
# linting and dependency checking is relevant only for packages where
# the source code was changed
run: npm run check-ci -- --stream --since ${SINCE_REF} --exclude-dependents
run: npm run check-ci -- --stream
shell: bash

- name: Run Tests
run: npm run test-ci -- --stream --since ${SINCE_REF}
run: npm run test-ci -- --stream
shell: bash
36 changes: 30 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions packages/devtools-proxy-support/src/fetch.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ import { HTTPServerProxyTestSetup } from '../test/helpers';

describe('createFetch', function () {
it("consistency check: plain `import('node-fetch')` fails", async function () {
if (process.versions.node >= '20.19.0') {
// 'node 20.19.0 has require(esm) enabled by default'
return this.skip();
}

let failed = false;
try {
await import('node-fetch');
Expand Down
7 changes: 6 additions & 1 deletion packages/devtools-proxy-support/src/proxy-options.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,12 @@ describe('proxy options handling', function () {
let setup: HTTPServerProxyTestSetup;

before(async function () {
if (process.platform === 'win32' && process.env.CI) {
// TODO: COMPASS-9232 reenable the test on Linux and, ideally, on Windows, after
// investigating the failures.
if (
(process.platform === 'win32' || process.platform === 'linux') &&
process.env.CI
) {
return this.skip();
}
setup = new HTTPServerProxyTestSetup();
Expand Down
2 changes: 1 addition & 1 deletion packages/download-url/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"bootstrap": "npm run compile",
"prepublishOnly": "npm run compile",
"compile": "tsc -p tsconfig.json && gen-esm-wrapper . ./.esm-wrapper.mjs",
"compile": "tsc -p tsconfig.json && gen-esm-wrapper . ./.esm-wrapper.mjs && prettier --write .esm-wrapper.mjs",
"typecheck": "tsc --noEmit",
"eslint": "eslint",
"prettier": "prettier",
Expand Down
25 changes: 23 additions & 2 deletions packages/mongodb-runner/src/mongocluster.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,15 @@ describe('MongoCluster', function () {
});

it('can spawn a 6.x enterprise standalone mongod', async function () {
if (process.platform === 'win32' && process.env.CI) {
return this.skip(); // Github Actions CI runners go OOM when extracting the 6.x enterprise tarball...
if (
(process.platform === 'win32' || process.platform === 'linux') &&
process.env.CI
) {
// Github Actions CI runners go OOM on Windows when extracting the 6.x enterprise tarball...
// On Ubuntu, 6.x only supports up to 22.04, while CI runs on 24.04.
return this.skip();
}

cluster = await MongoCluster.start({
version: '6.x-enterprise',
topology: 'standalone',
Expand All @@ -229,6 +235,21 @@ describe('MongoCluster', function () {
expect(ok).to.equal(1);
});

it('can spawn a 8.x enterprise standalone mongod', async function () {
cluster = await MongoCluster.start({
version: '8.x-enterprise',
topology: 'standalone',
tmpDir,
});
expect(cluster.connectionString).to.be.a('string');
expect(cluster.serverVersion).to.match(/^8\./);
expect(cluster.serverVariant).to.equal('enterprise');
const { ok } = await cluster.withClient(async (client) => {
return await client.db('admin').command({ ping: 1 });
});
expect(ok).to.equal(1);
});

it('can serialize and deserialize sharded cluster info', async function () {
cluster = await MongoCluster.start({
version: '6.x',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"lock": {
"name": "test-repo",
"version": "1.0.0",
"lockfileVersion": 2,
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
Expand Down Expand Up @@ -107,41 +107,6 @@
"package5": "2.0.0"
}
}
},
"dependencies": {
"package1": {
"version": "file:packages/package1"
},
"package2": {
"version": "file:packages/package2",
"requires": {
"package1": "2.0.0"
}
},
"package3": {
"version": "file:packages/package3",
"requires": {
"package1": "2.0.0"
}
},
"package4": {
"version": "file:packages/package4",
"requires": {
"package3": "1.0.1"
}
},
"package5": {
"version": "file:packages/package5",
"requires": {
"package1": "2.0.0"
}
},
"package6": {
"version": "file:packages/package6",
"requires": {
"package5": "2.0.0"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"lock": {
"name": "test-repo",
"version": "1.0.0",
"lockfileVersion": 2,
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
Expand Down Expand Up @@ -107,41 +107,6 @@
"package5": "1.1.0"
}
}
},
"dependencies": {
"package1": {
"version": "file:packages/package1"
},
"package2": {
"version": "file:packages/package2",
"requires": {
"package1": "1.1.0"
}
},
"package3": {
"version": "file:packages/package3",
"requires": {
"package1": "1.1.0"
}
},
"package4": {
"version": "file:packages/package4",
"requires": {
"package3": "1.0.1"
}
},
"package5": {
"version": "file:packages/package5",
"requires": {
"package1": "1.1.0"
}
},
"package6": {
"version": "file:packages/package6",
"requires": {
"package5": "1.1.0"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"lock": {
"name": "test-repo",
"version": "1.0.0",
"lockfileVersion": 2,
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
Expand Down Expand Up @@ -107,41 +107,6 @@
"package5": "1.0.0"
}
}
},
"dependencies": {
"package1": {
"version": "file:packages/package1"
},
"package2": {
"version": "file:packages/package2",
"requires": {
"package1": "1.0.0"
}
},
"package3": {
"version": "file:packages/package3",
"requires": {
"package1": "1.0.0"
}
},
"package4": {
"version": "file:packages/package4",
"requires": {
"package3": "1.0.0"
}
},
"package5": {
"version": "file:packages/package5",
"requires": {
"package1": "1.0.0"
}
},
"package6": {
"version": "file:packages/package6",
"requires": {
"package5": "1.0.0"
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"lock": {
"name": "test-repo",
"version": "1.0.0",
"lockfileVersion": 2,
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
Expand Down Expand Up @@ -107,41 +107,6 @@
"package5": "1.0.0"
}
}
},
"dependencies": {
"package1": {
"version": "file:packages/package1"
},
"package2": {
"version": "file:packages/package2",
"requires": {
"package1": "1.0.0"
}
},
"package3": {
"version": "file:packages/package3",
"requires": {
"package1": "1.0.0"
}
},
"package4": {
"version": "file:packages/package4",
"requires": {
"package3": "1.0.0"
}
},
"package5": {
"version": "file:packages/package5",
"requires": {
"package1": "1.0.0"
}
},
"package6": {
"version": "file:packages/package6",
"requires": {
"package5": "1.0.0"
}
}
}
}
}
Loading