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