21
21
22
22
jobs :
23
23
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
+
86
+ # Install the update server for auto-update tests
87
+ - test : auto-update-from
88
+ install-update-server : true
89
+ - test : auto-update-to
90
+ install-update-server : true
91
+
92
+ exclude :
93
+ # TODO: See https://github.com/mongodb-js/compass/actions/runs/13281152689/job/37079620322
94
+ - package : osx_dmg
95
+ test : auto-update-from
96
+ # TODO: See https://github.com/mongodb-js/compass/actions/runs/13281152689/job/37079621700
97
+ - package : windows_setup
98
+ test : auto-update-from
99
+ # Skip auto-update tests for isolated and readonly distributions for now
100
+ # This is not supported by the update server we're using in the test harness
101
+ - hadron-distribution : compass-isolated
102
+ test : auto-update-from
103
+ - hadron-distribution : compass-isolated
104
+ test : auto-update-to
105
+ - hadron-distribution : compass-readonly
106
+ test : auto-update-from
107
+ - hadron-distribution : compass-readonly
108
+ test : auto-update-to
109
+ # Temporary skip failing auto-update-to tests
110
+ - test : auto-update-to
111
+ package : osx_dmg
112
+ - test : auto-update-to
113
+ package : windows_zip
114
+ - test : auto-update-to
115
+ package : windows_msi
116
+ - test : auto-update-to
117
+ package : windows_setup
118
+ - test : auto-update-to
119
+ package : linux_deb
120
+
121
+ # Skip time-to-first-query tests for readonly because it doesn't have editable documents
122
+ # See https://github.com/mongodb-js/compass/actions/runs/13286945911/job/37097791601
123
+ - hadron-distribution : compass-readonly
124
+ test : time-to-first-query
125
+
126
+ runs-on : ${{ matrix.runs-on }}
127
+ env :
128
+ DEBUG : compass:smoketests:*
26
129
steps :
27
130
- name : Checkout
28
131
uses : actions/checkout@v2
@@ -31,6 +134,47 @@ jobs:
31
134
with :
32
135
node-version : 20
33
136
cache : " npm"
34
- - name : Install dependencies
137
+ - name : Cache downloads
138
+ uses : actions/cache@v4
139
+ with :
140
+ key : smoke-tests-downloads-${{ inputs.version }}-${{ runner.os }}-${{ runner.arch }}-${{ matrix.package }}
141
+ path : packages/compass-smoke-tests/.downloads
142
+ - name : Install dependencies and build packages
35
143
run : npm ci
36
-
144
+ - name : Bootstrap packages
145
+ run : npx lerna run bootstrap --scope @mongodb-js/compass-smoke-tests --include-dependencies
146
+
147
+ - name : Create GitHub App Token
148
+ if : matrix.install-update-server
149
+ uses : actions/create-github-app-token@v1
150
+ id : app-token
151
+ with :
152
+ app-id : ${{ vars.DEVTOOLS_BOT_APP_ID }}
153
+ private-key : ${{ secrets.DEVTOOLS_BOT_PRIVATE_KEY }}
154
+ owner : 10gen
155
+ repositories : compass-mongodb-com
156
+ - name : Checkout Compass Update server
157
+ if : matrix.install-update-server
158
+ uses : actions/checkout@v4
159
+ with :
160
+ repository : 10gen/compass-mongodb-com
161
+ token : ${{ steps.app-token.outputs.token }}
162
+ # Make sure the value of GITHUB_TOKEN will not be persisted in repo's config
163
+ persist-credentials : false
164
+ path : ' compass-mongodb-com'
165
+ - name : Install Compass Update server
166
+ if : matrix.install-update-server
167
+ run : npm install --no-save --workspace packages/compass-smoke-tests ${{ github.workspace }}/compass-mongodb-com
168
+
169
+ - name : Run tests
170
+ env :
171
+ EVERGREEN_BUCKET_NAME : ${{ inputs.bucket_name }}
172
+ EVERGREEN_BUCKET_KEY_PREFIX : ${{ inputs.bucket_key_prefix }}
173
+ DEV_VERSION_IDENTIFIER : ${{ inputs.version }}
174
+ HADRON_DISTRIBUTION : ${{ matrix.hadron-distribution }}
175
+ PLATFORM : ${{ matrix.hadron-platform }}
176
+ ARCH : ${{ matrix.arch }}
177
+ # Exposing token to prevent update server from being rate limited
178
+ GITHUB_TOKEN : ${{ github.token }}
179
+ working-directory : packages/compass-smoke-tests
180
+ run : npm start -- --package ${{ matrix.package }} --tests ${{ matrix.test }}
0 commit comments