Skip to content

Commit 23b1aee

Browse files
committed
Dispatch on GHA instead of running smoke tests on Evergreen
1 parent 0bfcee4 commit 23b1aee

File tree

3 files changed

+22
-118
lines changed

3 files changed

+22
-118
lines changed

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

Lines changed: 11 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -60,39 +60,6 @@ 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: 'ubuntu2004-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-gui',
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-gui',
92-
depends_on: 'package-macos-arm',
93-
}
94-
];
95-
9663
const TEST_PACKAGED_APP_BUILD_VARIANTS = [
9764
{
9865
name: 'test-packaged-app-ubuntu',
@@ -216,18 +183,16 @@ buildvariants:
216183
<% } %>
217184
<% } %>
218185

219-
<% for (const buildVariant of SMOKETEST_BUILD_VARIANTS) { %>
220-
<% for (const distribution of ['compass']) { %>
221-
- name: <%= buildVariant.name %>-<%= distribution %>
222-
display_name: <%= buildVariant.display_name %> (<%= distribution %>)
223-
run_on: <%= buildVariant.run_on %>
186+
- name: smoketest-packaged-app
187+
display_name: Smoke Test via GitHub Actions
188+
run_on: ubuntu2004-large
224189
depends_on:
225-
- name: package-<%= distribution %>
226-
variant: <%= buildVariant.depends_on %>
190+
<% for (const buildVariant of PACKAGE_BUILD_VARIANTS) { %>
191+
- name: package-compass
192+
variant: <%= buildVariant.name %>
193+
<% } %>
227194
tasks:
228-
- name: smoketest-<%= distribution %>
229-
<% } %>
230-
<% } %>
195+
- name: smoketest-packaged-app
231196

232197
- name: test-eol-servers
233198
display_name: Test EoL Servers
@@ -468,21 +433,17 @@ tasks:
468433
compass_distribution: <%= distribution %>
469434
<% } %>
470435

471-
<% for (const distribution of ['compass']) { %>
472-
- name: smoketest-<%= distribution %>
436+
- name: smoketest-packaged-app
473437
tags: ['required-for-publish', 'run-on-pr']
474438
commands:
475439
- func: prepare
476440
- func: install
477441
- func: bootstrap
478442
vars:
479-
scope: 'compass-e2e-tests'
480-
- func: smoketest-packaged-app
443+
scope: '@mongodb-js/compass-smoke-tests'
444+
- func: smoketest-on-github-actions
481445
vars:
482-
mongodb_version: <%= LATEST_MAINTAINED_SERVER_VERSION.version %>
483-
compass_distribution: <%= distribution %>
484446
debug: 'compass-e2e-tests*,electron*,hadron*,mongo*'
485-
<% } %>
486447

487448
<% for (const serverVersion of SERVER_VERSIONS) { %>
488449
<% for(const group of E2E_TEST_GROUPS) { %>

.evergreen/buildvariants-and-tasks.yml

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -76,46 +76,22 @@ 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)
79+
- name: smoketest-packaged-app
80+
display_name: Smoke Test via GitHub Actions
8181
run_on: ubuntu2004-large
8282
depends_on:
8383
- name: package-compass
8484
variant: package-ubuntu
85-
tasks:
86-
- name: smoketest-compass
87-
- name: smoketest-windows-compass
88-
display_name: Smoketest Windows (compass)
89-
run_on: windows-vsCurrent-large
90-
depends_on:
9185
- name: package-compass
9286
variant: package-windows
93-
tasks:
94-
- name: smoketest-compass
95-
- name: smoketest-rhel-compass
96-
display_name: Smoketest RHEL (compass)
97-
run_on: rhel80-large
98-
depends_on:
9987
- name: package-compass
10088
variant: package-rhel
101-
tasks:
102-
- name: smoketest-compass
103-
- name: smoketest-macos-x64-compass
104-
display_name: Smoketest MacOS Intel (compass)
105-
run_on: macos-14-gui
106-
depends_on:
10789
- name: package-compass
10890
variant: package-macos-x64
109-
tasks:
110-
- name: smoketest-compass
111-
- name: smoketest-macos-arm-compass
112-
display_name: Smoketest MacOS Arm64 (compass)
113-
run_on: macos-14-arm64-gui
114-
depends_on:
11591
- name: package-compass
11692
variant: package-macos-arm
11793
tasks:
118-
- name: smoketest-compass
94+
- name: smoketest-packaged-app
11995
- name: test-eol-servers
12096
display_name: Test EoL Servers
12197
run_on: ubuntu1804-large
@@ -508,7 +484,7 @@ tasks:
508484
- func: save-all-artifacts
509485
vars:
510486
compass_distribution: compass-readonly
511-
- name: smoketest-compass
487+
- name: smoketest-packaged-app
512488
tags:
513489
- required-for-publish
514490
- run-on-pr
@@ -517,11 +493,9 @@ tasks:
517493
- func: install
518494
- func: bootstrap
519495
vars:
520-
scope: compass-e2e-tests
521-
- func: smoketest-packaged-app
496+
scope: '@mongodb-js/compass-smoke-tests'
497+
- func: smoketest-on-github-actions
522498
vars:
523-
mongodb_version: 8.0.x-enterprise
524-
compass_distribution: compass
525499
debug: compass-e2e-tests*,electron*,hadron*,mongo*
526500
- name: test-server-40x-community-1
527501
tags:

.evergreen/functions.yml

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -648,14 +648,12 @@ functions:
648648
649649
npm run --unsafe-perm --workspace compass-e2e-tests test-packaged-ci
650650
651-
smoketest-packaged-app:
651+
smoketest-on-github-actions:
652652
- command: github.generate_token
653653
params:
654-
owner: 10gen
655-
repo: compass-mongodb-com
656654
expansion_name: generated_token
657655
permissions: # optional
658-
contents: read
656+
actions: write
659657
- command: shell.exec
660658
# Fail the task if it's idle for 10 mins
661659
timeout_secs: 600
@@ -664,43 +662,14 @@ functions:
664662
shell: bash
665663
env:
666664
<<: *compass-env
667-
<<: *compass-e2e-secrets
668665
DEBUG: ${debug|}
669-
MONGODB_VERSION: ${mongodb_version|}
670-
MONGODB_RUNNER_VERSION: ${mongodb_version|}
671-
HADRON_DISTRIBUTION: ${compass_distribution}
666+
GITHUB_TOKEN: ${generated_token}
672667
script: |
673668
set -e
674669
# Load environment variables
675670
eval $(.evergreen/print-compass-env.sh)
676-
677-
npm i -w packages/compass-smoke-tests https://x-access-token:${generated_token}@github.com/10gen/compass-mongodb-com --engine-strict=false
678-
679-
if [[ "$IS_WINDOWS" == "true" ]]; then
680-
npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=windows_setup --tests time-to-first-query
681-
npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=windows_zip --tests auto-update-from
682-
npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=windows_msi --tests auto-update-from
683-
fi
684-
685-
if [[ "$IS_OSX" == "true" ]]; then
686-
echo "Disabling clipboard usage in e2e tests (TODO: https://jira.mongodb.org/browse/BUILD-14780)"
687-
export COMPASS_E2E_DISABLE_CLIPBOARD_USAGE="true"
688-
# NOTE: We're also skipping auto-update of the macOS app in CI
689-
# because it doesn't work. Running a different test to make sure it
690-
# can install and run successfully at least.
691-
npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=osx_zip --tests=time-to-first-query
692-
npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=osx_dmg --tests=time-to-first-query
693-
fi
694-
695-
if [[ "$IS_UBUNTU" == "true" ]]; then
696-
npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=linux_deb --tests=time-to-first-query
697-
npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=linux_tar --tests=time-to-first-query
698-
fi
699-
700-
if [[ "$IS_RHEL" == "true" ]]; then
701-
# npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=linux_rpm --tests=time-to-first-query
702-
npm run --unsafe-perm --workspace @mongodb-js/compass-smoke-tests start -- --package=linux_tar --tests=time-to-first-query
703-
fi
671+
# Start the smoke tests on GitHub Actions and wait for successful completion
672+
npm run --workspace @mongodb-js/compass-smoke-tests start -- dispatch
704673
705674
test-web-sandbox:
706675
- command: shell.exec

0 commit comments

Comments
 (0)