async function checkMongoDbVersions() {
  let latestStableVersions = await new Promise((resolve, reject) => {
    exec('m ls', (error, stdout) => {
      if (error) {
        reject(error);
        return;
      }
      resolve(stdout.trim());
    });
  });
  latestStableVersions = latestStableVersions.split('\n').map(version => version.trim());

  await new CiVersionCheck({
    packageName: 'MongoDB',
    packageSupportUrl: 'https://www.mongodb.com/support-policy',
    yamlFilePath: './.github/workflows/ci.yml',
    ciEnvironmentsKeyPath: 'jobs.check-mongo.strategy.matrix.include',
    ciVersionKey: 'MONGODB_VERSION',
    releasedVersions: latestStableVersions,
    latestComponent: CiVersionCheck.versionComponents.patch,
    ignoreReleasedVersions: [
      '<4.2.0', // These versions have reached their end-of-life support date
      '>=4.3.0 <5.0.0', // Unsupported rapid release versions
      '>=5.1.0 <6.0.0', // Unsupported rapid release versions
      '>=6.1.0 <7.0.0', // Unsupported rapid release versions
      '>=7.1.0 <8.0.0', // Unsupported rapid release versions
    ],
  }).check();
}
Check the MongoDB versions used in test environments.