2121
2222jobs :
2323 test :
24- name : Dummy action
25- runs-on : ubuntu-latest
24+ name : ${{ matrix.package }} test ${{ matrix.test }} (${{ matrix.hadron-distribution }})
25+ strategy :
26+ fail-fast : false
27+ matrix :
28+ test :
29+ - time-to-first-query
30+ - auto-update-from
31+ - auto-update-to
32+ package :
33+ - osx_dmg
34+ - osx_zip
35+ - windows_zip
36+ - windows_msi
37+ - windows_setup
38+ - linux_deb
39+ # TODO: Re-enable (see https://github.com/mongodb-js/compass/actions/runs/13281152689/job/37079619474)
40+ # - linux_tar
41+ # TODO: Enable (needs a docker container)
42+ - linux_rpm
43+ hadron-distribution :
44+ - compass
45+ - compass-readonly
46+ - compass-isolated
47+ include :
48+ # MacOS
49+ - package : osx_dmg
50+ runs-on : macos-13
51+ arch : x64
52+ hadron-platform : darwin
53+ - package : osx_zip
54+ runs-on : macos-latest
55+ arch : arm64
56+ hadron-platform : darwin
57+
58+ # Windows
59+ - package : windows_zip
60+ runs-on : windows-latest
61+ arch : x64
62+ hadron-platform : windows
63+ - package : windows_msi
64+ runs-on : windows-latest
65+ arch : x64
66+ hadron-platform : windows
67+ - package : windows_setup
68+ runs-on : windows-latest
69+ arch : x64
70+ hadron-platform : windows
71+
72+ # Linux
73+ - package : linux_deb
74+ runs-on : ubuntu-latest
75+ arch : x64
76+ hadron-platform : linux
77+ # - package: linux_tar
78+ # runs-on: ubuntu-latest
79+ # arch: x64
80+ # hadron-platform: linux
81+ - package : linux_rpm
82+ runs-on : ubuntu-latest
83+ arch : x64
84+ hadron-platform : linux
85+ distro-id : rhel80
86+ post-checkout-command : |
87+ dnf install -y gcc gcc-c++ make git nss dbus xorg-x11-server-Xvfb yum-utils
88+ # Enable the devel repo to install compat-openssl11 (bringing libcrupto.so.1.1 to run mongod)
89+ dnf config-manager --set-enabled devel
90+ dnf update -y
91+ dnf install -y compat-openssl11
92+ container :
93+ image : rockylinux:9
94+ volumes :
95+ - ${{ github.workspace }}:/compass
96+
97+ # Install the update server for auto-update tests
98+ - test : auto-update-from
99+ install-update-server : true
100+ - test : auto-update-to
101+ install-update-server : true
102+
103+ exclude :
104+ # TODO: See https://github.com/mongodb-js/compass/actions/runs/13281152689/job/37079620322
105+ - package : osx_dmg
106+ test : auto-update-from
107+ # TODO: See https://github.com/mongodb-js/compass/actions/runs/13281152689/job/37079621700
108+ - package : windows_setup
109+ test : auto-update-from
110+ # Skip auto-update tests for isolated and readonly distributions for now
111+ # This is not supported by the update server we're using in the test harness
112+ - hadron-distribution : compass-isolated
113+ test : auto-update-from
114+ - hadron-distribution : compass-isolated
115+ test : auto-update-to
116+ - hadron-distribution : compass-readonly
117+ test : auto-update-from
118+ - hadron-distribution : compass-readonly
119+ test : auto-update-to
120+ # Temporary skip failing auto-update-to tests
121+ - test : auto-update-to
122+ package : osx_dmg
123+ - test : auto-update-to
124+ package : windows_zip
125+ - test : auto-update-to
126+ package : windows_msi
127+ - test : auto-update-to
128+ package : windows_setup
129+ # Waiting for https://github.com/10gen/compass-mongodb-com/pull/122 to be released
130+ - test : auto-update-to
131+ package : linux_deb
132+ - test : auto-update-to
133+ package : linux_rpm
134+
135+ # Skip time-to-first-query tests for readonly because it doesn't have editable documents
136+ # See https://github.com/mongodb-js/compass/actions/runs/13286945911/job/37097791601
137+ - hadron-distribution : compass-readonly
138+ test : time-to-first-query
139+
140+ runs-on : ${{ matrix.runs-on }}
141+ container : ${{ matrix.container }}
142+ env :
143+ DEBUG : compass:smoketests:*
26144 steps :
27145 - name : Checkout
28146 uses : actions/checkout@v2
@@ -31,6 +149,56 @@ jobs:
31149 with :
32150 node-version : 20
33151 cache : " npm"
34- - name : Install dependencies
152+
153+ - name : Run post-checkout command
154+ if : matrix.post-checkout-command
155+ run : ${{ matrix.post-checkout-command }}
156+
157+ - name : Cache downloads
158+ uses : actions/cache@v4
159+ with :
160+ key : smoke-tests-downloads-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}-${{ matrix.package }}
161+ path : packages/compass-smoke-tests/.downloads
162+ - name : Install dependencies and build packages
35163 run : npm ci
36-
164+ - name : Bootstrap packages
165+ run : npx lerna run bootstrap --scope @mongodb-js/compass-smoke-tests --include-dependencies
166+
167+ - name : Create GitHub App Token
168+ if : matrix.install-update-server
169+ uses : actions/create-github-app-token@v1
170+ id : app-token
171+ with :
172+ app-id : ${{ vars.DEVTOOLS_BOT_APP_ID }}
173+ private-key : ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
174+ owner : 10gen
175+ repositories : compass-mongodb-com
176+ - name : Checkout Compass Update server
177+ if : matrix.install-update-server
178+ uses : actions/checkout@v4
179+ with :
180+ repository : 10gen/compass-mongodb-com
181+ token : ${{ steps.app-token.outputs.token }}
182+ # Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
183+ persist-credentials : false
184+ path : compass-mongodb-com
185+ - name : Install Compass Update server
186+ if : matrix.install-update-server
187+ run : npm install --no-save --workspace packages/compass-smoke-tests ./compass-mongodb-com
188+
189+ - name : Run tests
190+ env :
191+ EVERGREEN_BUCKET_NAME : ${{ inputs.bucket_name }}
192+ EVERGREEN_BUCKET_KEY_PREFIX : ${{ inputs.bucket_key_prefix }}
193+ DEV_VERSION_IDENTIFIER : ${{ inputs.version }}
194+ HADRON_DISTRIBUTION : ${{ matrix.hadron-distribution }}
195+ PLATFORM : ${{ matrix.hadron-platform }}
196+ ARCH : ${{ matrix.arch }}
197+ # Useful to pass a "fake" DISTRO_ID environment to inform the "mongodb-download-url" package
198+ # See https://github.com/mongodb-js/devtools-shared/blob/aff66db7b7fc4f8ecaec2383fd4e8c116733a7e4/packages/download-url/src/linux-distro.ts#L14
199+ DISTRO_ID : ${{ matrix.distro-id }}
200+ # Exposing token to prevent update server from being rate limited
201+ GITHUB_TOKEN : ${{ github.token }}
202+ working-directory : packages/compass-smoke-tests
203+ # Using --skipUninstalling --skipCleanup because the runners are ephemeral
204+ run : npm start -- --package ${{ matrix.package }} --tests ${{ matrix.test }} --skipUninstall --skipCleanup
0 commit comments