Skip to content

Commit 5cc297c

Browse files
CI changes
1 parent 296faac commit 5cc297c

File tree

4 files changed

+90
-48
lines changed

4 files changed

+90
-48
lines changed

.evergreen/ci_matrix_constants.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
const MONGODB_VERSIONS = ['latest', 'rapid', '7.0', '6.0', '5.0', '4.4', '4.2', '4.0', '3.6'];
22
const versions = [
3-
{ codeName: 'fermium', versionNumber: 14 },
4-
{ codeName: 'gallium', versionNumber: 16 },
5-
{ codeName: 'hydrogen', versionNumber: 18 },
6-
{ codeName: 'iron', versionNumber: 20 }
3+
{ codeName: 'fermium', versionNumber: 14, npmVersion: 9 },
4+
{ codeName: 'gallium', versionNumber: 16, npmVersion: 9 },
5+
{ codeName: 'hydrogen', versionNumber: 18, npmVersion: 'latest' },
6+
{ codeName: 'iron', versionNumber: 20, npmVersion: 'latest' }
77
];
88
const NODE_VERSIONS = versions.map(({ versionNumber }) => versionNumber).sort((a, b) => a - b);
99
const LOWEST_LTS = NODE_VERSIONS[0];

.evergreen/config.yml

Lines changed: 46 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2914,9 +2914,9 @@ tasks:
29142914
- func: add aws auth variables to file
29152915
- func: setup aws env
29162916
- func: run aws auth test AssumeRoleWithWebIdentity with AWS_ROLE_SESSION_NAME set
2917-
- name: run-unit-tests
2917+
- name: run-unit-tests-node-14
29182918
tags:
2919-
- run-unit-tests
2919+
- unit-tests
29202920
commands:
29212921
- command: expansions.update
29222922
type: setup
@@ -2926,9 +2926,45 @@ tasks:
29262926
- {key: NPM_VERSION, value: '9'}
29272927
- func: install dependencies
29282928
- func: run unit tests
2929+
- name: run-unit-tests-node-16
2930+
tags:
2931+
- unit-tests
2932+
commands:
2933+
- command: expansions.update
2934+
type: setup
2935+
params:
2936+
updates:
2937+
- {key: NODE_LTS_VERSION, value: '16'}
2938+
- {key: NPM_VERSION, value: '9'}
2939+
- func: install dependencies
2940+
- func: run unit tests
2941+
- name: run-unit-tests-node-18
2942+
tags:
2943+
- unit-tests
2944+
commands:
2945+
- command: expansions.update
2946+
type: setup
2947+
params:
2948+
updates:
2949+
- {key: NODE_LTS_VERSION, value: '18'}
2950+
- {key: NPM_VERSION, value: latest}
2951+
- func: install dependencies
2952+
- func: run unit tests
2953+
- name: run-unit-tests-node-20
2954+
tags:
2955+
- unit-tests
2956+
commands:
2957+
- command: expansions.update
2958+
type: setup
2959+
params:
2960+
updates:
2961+
- {key: NODE_LTS_VERSION, value: '20'}
2962+
- {key: NPM_VERSION, value: latest}
2963+
- func: install dependencies
2964+
- func: run unit tests
29292965
- name: run-lint-checks
29302966
tags:
2931-
- run-lint-checks
2967+
- lint-checks
29322968
commands:
29332969
- command: expansions.update
29342970
type: setup
@@ -2941,6 +2977,7 @@ tasks:
29412977
- name: check-types-typescript-next
29422978
tags:
29432979
- check-types-typescript-next
2980+
- typescript-compilation
29442981
commands:
29452982
- command: expansions.update
29462983
type: setup
@@ -2954,6 +2991,7 @@ tasks:
29542991
- name: compile-driver-typescript-current
29552992
tags:
29562993
- compile-driver-typescript-current
2994+
- typescript-compilation
29572995
commands:
29582996
- command: expansions.update
29592997
type: setup
@@ -2967,6 +3005,7 @@ tasks:
29673005
- name: check-types-typescript-current
29683006
tags:
29693007
- check-types-typescript-current
3008+
- typescript-compilation
29703009
commands:
29713010
- command: expansions.update
29723011
type: setup
@@ -2980,6 +3019,7 @@ tasks:
29803019
- name: check-types-typescript-4.1.6
29813020
tags:
29823021
- check-types-typescript-4.1.6
3022+
- typescript-compilation
29833023
commands:
29843024
- command: expansions.update
29853025
type: setup
@@ -4347,12 +4387,9 @@ buildvariants:
43474387
display_name: lint
43484388
run_on: rhel80-large
43494389
tasks:
4350-
- run-unit-tests
4351-
- run-lint-checks
4352-
- check-types-typescript-next
4353-
- compile-driver-typescript-current
4354-
- check-types-typescript-current
4355-
- check-types-typescript-4.1.6
4390+
- .unit-tests
4391+
- .lint-checks
4392+
- .typescript-compilation
43564393
- name: generate-combined-coverage
43574394
display_name: Generate Combined Coverage
43584395
run_on: rhel80-large

.evergreen/generate_evergreen_tasks.js

Lines changed: 38 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -496,35 +496,40 @@ BUILD_VARIANTS.push({
496496
tasks: ['test-rapid-server']
497497
});
498498

499+
const unitTestTasks = Array.from((
500+
function* () {
501+
for (const { versionNumber: NODE_LTS_VERSION, npmVersion: NPM_VERSION } of versions) {
502+
yield {
503+
name: `run-unit-tests-node-${NODE_LTS_VERSION}`,
504+
tags: ['unit-tests'],
505+
commands: [
506+
updateExpansions({
507+
NODE_LTS_VERSION,
508+
NPM_VERSION
509+
}),
510+
{ func: 'install dependencies' },
511+
{ func: 'run unit tests' }
512+
]
513+
}
514+
}
515+
})())
516+
499517
// singleton build variant for linting
500518
SINGLETON_TASKS.push(
501-
...[
502-
{
503-
name: 'run-unit-tests',
504-
tags: ['run-unit-tests'],
505-
commands: [
506-
updateExpansions({
507-
NODE_LTS_VERSION: LOWEST_LTS,
508-
NPM_VERSION: 9
509-
}),
510-
{ func: 'install dependencies' },
511-
{ func: 'run unit tests' }
512-
]
513-
},
514-
{
515-
name: 'run-lint-checks',
516-
tags: ['run-lint-checks'],
517-
commands: [
518-
updateExpansions({
519-
NODE_LTS_VERSION: LOWEST_LTS,
520-
NPM_VERSION: 9
521-
}),
522-
{ func: 'install dependencies' },
523-
{ func: 'run lint checks' }
524-
]
525-
},
526-
...Array.from(makeTypescriptTasks())
527-
]
519+
...unitTestTasks,
520+
{
521+
name: 'run-lint-checks',
522+
tags: ['lint-checks'],
523+
commands: [
524+
updateExpansions({
525+
NODE_LTS_VERSION: LOWEST_LTS,
526+
NPM_VERSION: 9
527+
}),
528+
{ func: 'install dependencies' },
529+
{ func: 'run lint checks' }
530+
]
531+
},
532+
...Array.from(makeTypescriptTasks())
528533
);
529534

530535
function* makeTypescriptTasks() {
@@ -533,7 +538,7 @@ function* makeTypescriptTasks() {
533538
if (TS_VERSION !== '4.1.6' && TS_VERSION !== 'next') {
534539
yield {
535540
name: `compile-driver-typescript-${TS_VERSION}`,
536-
tags: [`compile-driver-typescript-${TS_VERSION}`],
541+
tags: [`compile-driver-typescript-${TS_VERSION}`, 'typescript-compilation'],
537542
commands: [
538543
updateExpansions({
539544
NODE_LTS_VERSION: LOWEST_LTS,
@@ -548,7 +553,7 @@ function* makeTypescriptTasks() {
548553

549554
yield {
550555
name: `check-types-typescript-${TS_VERSION}`,
551-
tags: [`check-types-typescript-${TS_VERSION}`],
556+
tags: [`check-types-typescript-${TS_VERSION}`, 'typescript-compilation'],
552557
commands: [
553558
updateExpansions({
554559
NODE_LTS_VERSION: LOWEST_LTS,
@@ -562,7 +567,7 @@ function* makeTypescriptTasks() {
562567
}
563568
return {
564569
name: 'run-typescript-next',
565-
tags: ['run-typescript-next'],
570+
tags: ['run-typescript-next', 'typescript-compilation'],
566571
commands: [
567572
updateExpansions({
568573
NODE_LTS_VERSION: LOWEST_LTS,
@@ -579,9 +584,9 @@ BUILD_VARIANTS.push({
579584
display_name: 'lint',
580585
run_on: DEFAULT_OS,
581586
tasks: [
582-
'run-unit-tests',
583-
'run-lint-checks',
584-
...Array.from(makeTypescriptTasks()).map(({ name }) => name)
587+
'.unit-tests',
588+
'.lint-checks',
589+
'.typescript-compilation'
585590
]
586591
});
587592

test/unit/assorted/polling_srv_records_for_mongos_discovery.prose.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import * as dns from 'dns';
33
import * as sinon from 'sinon';
44

55
import {
6+
type SrvPollerOptions,
7+
type TopologyOptions,
68
HostAddress,
79
isHello,
810
MongoClient,
911
SrvPoller,
10-
type SrvPollerOptions,
1112
SrvPollingEvent,
12-
type TopologyOptions,
1313
TopologyType
1414
} from '../../mongodb';
1515
import * as mock from '../../tools/mongodb-mock/index';

0 commit comments

Comments
 (0)