Skip to content

Commit fcb5ad6

Browse files
committed
initial smoketest task & entrypoint
1 parent 92bdb85 commit fcb5ad6

File tree

5 files changed

+360
-64
lines changed

5 files changed

+360
-64
lines changed

.evergreen/buildvariants-and-tasks.in.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,39 @@ const PACKAGE_BUILD_VARIANTS = [
6060
}
6161
];
6262
63+
const SMOKETEST_BUILD_VARIANTS = [
64+
{
65+
name: 'smoketest-ubuntu',
66+
display_name: 'Smoketest Ubuntu',
67+
run_on: 'ubuntu1804-large',
68+
depends_on: 'package-ubuntu',
69+
},
70+
{
71+
name: 'smoketest-windows',
72+
display_name: 'Smoketest Windows',
73+
run_on: 'windows-vsCurrent-large',
74+
depends_on: 'package-windows',
75+
},
76+
{
77+
name: 'smoketest-rhel',
78+
display_name: 'Smoketest RHEL',
79+
run_on: 'rhel80-large',
80+
depends_on: 'package-rhel',
81+
},
82+
{
83+
name: 'smoketest-macos-x64',
84+
display_name: 'Smoketest MacOS Intel',
85+
run_on: 'macos-14',
86+
depends_on: 'package-macos-x64',
87+
},
88+
{
89+
name: 'smoketest-macos-arm',
90+
display_name: 'Smoketest MacOS Arm64',
91+
run_on: 'macos-14-arm64',
92+
depends_on: 'package-macos-arm',
93+
}
94+
];
95+
6396
const TEST_PACKAGED_APP_BUILD_VARIANTS = [
6497
{
6598
name: 'test-packaged-app-ubuntu',
@@ -180,6 +213,19 @@ buildvariants:
180213
<% } %>
181214
<% } %>
182215

216+
<% for (const buildVariant of SMOKETEST_BUILD_VARIANTS) { %>
217+
<% for (const distribution of COMPASS_DISTRIBUTIONS) { %>
218+
- name: <%= buildVariant.name %>-<%= distribution %>
219+
display_name: <%= buildVariant.display_name %> (<%= distribution %>)
220+
run_on: <%= buildVariant.run_on %>
221+
depends_on:
222+
- name: package-<%= distribution %>
223+
variant: <%= buildVariant.depends_on %>
224+
tasks:
225+
- name: smoketest-<%= distribution %>
226+
<% } %>
227+
<% } %>
228+
183229
- name: test-eol-servers
184230
display_name: Test EoL Servers
185231
run_on: ubuntu1804-large
@@ -424,6 +470,20 @@ tasks:
424470
- func: save-all-artifacts
425471
vars:
426472
compass_distribution: <%= distribution %>
473+
474+
- name: smoketest-<%= distribution %>
475+
tags: ['required-for-publish', 'run-on-pr']
476+
commands:
477+
- func: prepare
478+
- func: install
479+
- func: bootstrap
480+
vars:
481+
scope: '@mongodb-js/compass-e2e-tests'
482+
- func: smoketest-packaged-app
483+
vars:
484+
mongodb_version: latest-enterprise
485+
compass_distribution: <%= distribution %>
486+
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
427487
<% } %>
428488

429489
<% for (const serverVersion of SERVER_VERSIONS) { %>

.evergreen/buildvariants-and-tasks.yml

Lines changed: 165 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,126 @@ buildvariants:
7676
- name: package-compass
7777
- name: package-compass-isolated
7878
- name: package-compass-readonly
79+
- name: smoketest-ubuntu-compass
80+
display_name: Smoketest Ubuntu (compass)
81+
run_on: ubuntu1804-large
82+
depends_on:
83+
- name: package-compass
84+
variant: package-ubuntu
85+
tasks:
86+
- name: smoketest-compass
87+
- name: smoketest-ubuntu-compass-isolated
88+
display_name: Smoketest Ubuntu (compass-isolated)
89+
run_on: ubuntu1804-large
90+
depends_on:
91+
- name: package-compass-isolated
92+
variant: package-ubuntu
93+
tasks:
94+
- name: smoketest-compass-isolated
95+
- name: smoketest-ubuntu-compass-readonly
96+
display_name: Smoketest Ubuntu (compass-readonly)
97+
run_on: ubuntu1804-large
98+
depends_on:
99+
- name: package-compass-readonly
100+
variant: package-ubuntu
101+
tasks:
102+
- name: smoketest-compass-readonly
103+
- name: smoketest-windows-compass
104+
display_name: Smoketest Windows (compass)
105+
run_on: windows-vsCurrent-large
106+
depends_on:
107+
- name: package-compass
108+
variant: package-windows
109+
tasks:
110+
- name: smoketest-compass
111+
- name: smoketest-windows-compass-isolated
112+
display_name: Smoketest Windows (compass-isolated)
113+
run_on: windows-vsCurrent-large
114+
depends_on:
115+
- name: package-compass-isolated
116+
variant: package-windows
117+
tasks:
118+
- name: smoketest-compass-isolated
119+
- name: smoketest-windows-compass-readonly
120+
display_name: Smoketest Windows (compass-readonly)
121+
run_on: windows-vsCurrent-large
122+
depends_on:
123+
- name: package-compass-readonly
124+
variant: package-windows
125+
tasks:
126+
- name: smoketest-compass-readonly
127+
- name: smoketest-rhel-compass
128+
display_name: Smoketest RHEL (compass)
129+
run_on: rhel80-large
130+
depends_on:
131+
- name: package-compass
132+
variant: package-rhel
133+
tasks:
134+
- name: smoketest-compass
135+
- name: smoketest-rhel-compass-isolated
136+
display_name: Smoketest RHEL (compass-isolated)
137+
run_on: rhel80-large
138+
depends_on:
139+
- name: package-compass-isolated
140+
variant: package-rhel
141+
tasks:
142+
- name: smoketest-compass-isolated
143+
- name: smoketest-rhel-compass-readonly
144+
display_name: Smoketest RHEL (compass-readonly)
145+
run_on: rhel80-large
146+
depends_on:
147+
- name: package-compass-readonly
148+
variant: package-rhel
149+
tasks:
150+
- name: smoketest-compass-readonly
151+
- name: smoketest-macos-x64-compass
152+
display_name: Smoketest MacOS Intel (compass)
153+
run_on: macos-14
154+
depends_on:
155+
- name: package-compass
156+
variant: package-macos-x64
157+
tasks:
158+
- name: smoketest-compass
159+
- name: smoketest-macos-x64-compass-isolated
160+
display_name: Smoketest MacOS Intel (compass-isolated)
161+
run_on: macos-14
162+
depends_on:
163+
- name: package-compass-isolated
164+
variant: package-macos-x64
165+
tasks:
166+
- name: smoketest-compass-isolated
167+
- name: smoketest-macos-x64-compass-readonly
168+
display_name: Smoketest MacOS Intel (compass-readonly)
169+
run_on: macos-14
170+
depends_on:
171+
- name: package-compass-readonly
172+
variant: package-macos-x64
173+
tasks:
174+
- name: smoketest-compass-readonly
175+
- name: smoketest-macos-arm-compass
176+
display_name: Smoketest MacOS Arm64 (compass)
177+
run_on: macos-14-arm64
178+
depends_on:
179+
- name: package-compass
180+
variant: package-macos-arm
181+
tasks:
182+
- name: smoketest-compass
183+
- name: smoketest-macos-arm-compass-isolated
184+
display_name: Smoketest MacOS Arm64 (compass-isolated)
185+
run_on: macos-14-arm64
186+
depends_on:
187+
- name: package-compass-isolated
188+
variant: package-macos-arm
189+
tasks:
190+
- name: smoketest-compass-isolated
191+
- name: smoketest-macos-arm-compass-readonly
192+
display_name: Smoketest MacOS Arm64 (compass-readonly)
193+
run_on: macos-14-arm64
194+
depends_on:
195+
- name: package-compass-readonly
196+
variant: package-macos-arm
197+
tasks:
198+
- name: smoketest-compass-readonly
79199
- name: test-eol-servers
80200
display_name: Test EoL Servers
81201
run_on: ubuntu1804-large
@@ -426,6 +546,21 @@ tasks:
426546
- func: save-all-artifacts
427547
vars:
428548
compass_distribution: compass
549+
- name: smoketest-compass
550+
tags:
551+
- required-for-publish
552+
- run-on-pr
553+
commands:
554+
- func: prepare
555+
- func: install
556+
- func: bootstrap
557+
vars:
558+
scope: '@mongodb-js/compass-e2e-tests'
559+
- func: smoketest-packaged-app
560+
vars:
561+
mongodb_version: latest-enterprise
562+
compass_distribution: compass
563+
debug: compass-e2e-tests*,electron*,hadron*,mongo*
429564
- name: package-compass-isolated
430565
tags:
431566
- required-for-publish
@@ -449,6 +584,21 @@ tasks:
449584
- func: save-all-artifacts
450585
vars:
451586
compass_distribution: compass-isolated
587+
- name: smoketest-compass-isolated
588+
tags:
589+
- required-for-publish
590+
- run-on-pr
591+
commands:
592+
- func: prepare
593+
- func: install
594+
- func: bootstrap
595+
vars:
596+
scope: '@mongodb-js/compass-e2e-tests'
597+
- func: smoketest-packaged-app
598+
vars:
599+
mongodb_version: latest-enterprise
600+
compass_distribution: compass-isolated
601+
debug: compass-e2e-tests*,electron*,hadron*,mongo*
452602
- name: package-compass-readonly
453603
tags:
454604
- required-for-publish
@@ -472,6 +622,21 @@ tasks:
472622
- func: save-all-artifacts
473623
vars:
474624
compass_distribution: compass-readonly
625+
- name: smoketest-compass-readonly
626+
tags:
627+
- required-for-publish
628+
- run-on-pr
629+
commands:
630+
- func: prepare
631+
- func: install
632+
- func: bootstrap
633+
vars:
634+
scope: '@mongodb-js/compass-e2e-tests'
635+
- func: smoketest-packaged-app
636+
vars:
637+
mongodb_version: latest-enterprise
638+
compass_distribution: compass-readonly
639+
debug: compass-e2e-tests*,electron*,hadron*,mongo*
475640
- name: test-server-40x-community-1
476641
tags:
477642
- required-for-publish

.evergreen/functions.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -651,6 +651,31 @@ functions:
651651
652652
npm run --unsafe-perm --workspace compass-e2e-tests test-packaged-ci
653653
654+
smoketest-packaged-app:
655+
- command: shell.exec
656+
# Fail the task if it's idle for 10 mins
657+
timeout_secs: 600
658+
params:
659+
working_dir: src
660+
shell: bash
661+
env:
662+
<<: *compass-env
663+
DEBUG: ${debug|}
664+
MONGODB_VERSION: ${mongodb_version|}
665+
MONGODB_RUNNER_VERSION: ${mongodb_version|}
666+
HADRON_DISTRIBUTION: ${compass_distribution}
667+
script: |
668+
set -e
669+
# Load environment variables
670+
eval $(.evergreen/print-compass-env.sh)
671+
672+
if [[ "$IS_OSX" == "true" ]]; then
673+
echo "Disabling clipboard usage in e2e tests (TODO: https://jira.mongodb.org/browse/BUILD-14780)"
674+
export COMPASS_E2E_DISABLE_CLIPBOARD_USAGE="true"
675+
fi
676+
677+
npm run --workspace compass-e2e-tests smoketest
678+
654679
test-web-sandbox:
655680
- command: shell.exec
656681
# Fail the task if it's idle for 10 mins

packages/compass-e2e-tests/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"test-web": "env DEBUG=hadron*,mongo*,compass*,xvfb-maybe* npm run test web",
2929
"test-web-noserver": "env DEBUG=hadron*,mongo*,compass*,xvfb-maybe* npm run test web -- --disable-start-stop --bail",
3030
"coverage-merge": "nyc merge .log/coverage .nyc_output/coverage.json",
31-
"coverage-report": "npm run coverage-merge && nyc report"
31+
"coverage-report": "npm run coverage-merge && nyc report",
32+
"smoketest": "./smoke-test.ts"
3233
},
3334
"devDependencies": {
3435
"@electron/rebuild": "^3.7.1",

0 commit comments

Comments
 (0)