@@ -15,7 +15,7 @@ concurrency:
15
15
jobs :
16
16
run-tests :
17
17
name : ${{ matrix.shard_name }}(py=${{ matrix.python-version }},dj=${{ matrix.django-version }},mongo=${{ matrix.mongo-version }})
18
- runs-on : ubuntu-22.04
18
+ runs-on : ${{ matrix.os-version }}
19
19
strategy :
20
20
matrix :
21
21
python-version :
@@ -43,22 +43,27 @@ jobs:
43
43
- " xmodule-with-cms"
44
44
mongo-version :
45
45
- " 7.0"
46
+ os-version :
47
+ - ubuntu-24.04
46
48
47
- # We only need to test older versions of Mongo with modules that directly interface with Mongo (that is: xmodule.modulestore)
48
- # This code is left here as an example for future refernce in case we need to reduce the number of shards we're
49
- # testing but still have good confidence with older versions of mongo. We use Mongo 4.4 in the example.
49
+ # It's useful to run some subset of the tests on the older version of Ubuntu
50
+ # so that we don't spend too many resources on this but can find major issues quickly
51
+ # while we're in a situation where we support two versions. This section may be commented
52
+ # out when not in use to easily add/drop future support for any given major dependency.
50
53
#
51
- # exclude:
52
- # - mongo-version: "4.4"
53
- # include:
54
- # - shard_name: "xmodule-with-cms"
55
- # python-version: "3.11"
56
- # django-version: "pinned"
57
- # mongo-version: "4.4"
58
- # - shard_name: "xmodule-with-lms"
59
- # python-version: "3.11"
60
- # django-version: "pinned"
61
- # mongo-version: "4.4"
54
+ # We're testing the older version of Ubuntu and running the xmodule tests since those rely on many
55
+ # dependent complex libraries and will hopefully catch most issues quickly.
56
+ include :
57
+ - shard_name : " xmodule-with-cms"
58
+ python-version : " 3.11"
59
+ django-version : " pinned"
60
+ mongo-version : " 7.0"
61
+ os-version : " ubuntu-22.04"
62
+ - shard_name : " xmodule-with-lms"
63
+ python-version : " 3.11"
64
+ django-version : " pinned"
65
+ mongo-version : " 7.0"
66
+ os-version : " ubuntu-22.04"
62
67
63
68
steps :
64
69
- name : checkout repo
@@ -90,19 +95,10 @@ jobs:
90
95
activate = 1
91
96
EOF
92
97
93
- - name : install mongo version
94
- run : |
95
- if [[ "${{ matrix.mongo-version }}" != "4.4" ]]; then
96
- wget -qO - https://www.mongodb.org/static/pgp/server-${{ matrix.mongo-version }}.asc | sudo apt-key add -
97
- echo "deb https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/${{ matrix.mongo-version }} multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-${{ matrix.mongo-version }}.list
98
- sudo apt-get update && sudo apt-get install -y mongodb-org="${{ matrix.mongo-version }}.*"
99
- fi
100
-
101
- - name : start mongod server for tests
102
- run : |
103
- sudo mkdir -p /data/db
104
- sudo chmod -R a+rw /data/db
105
- mongod &
98
+ - name : Start MongoDB
99
+ uses :
supercharge/[email protected]
100
+ with :
101
+ mongodb-version : ${{ matrix.mongo-version }}
106
102
107
103
- name : Setup Python
108
104
uses : actions/setup-python@v5
@@ -164,7 +160,7 @@ jobs:
164
160
overwrite : true
165
161
166
162
collect-and-verify :
167
- runs-on : ubuntu-22 .04
163
+ runs-on : ubuntu-24 .04
168
164
steps :
169
165
- uses : actions/checkout@v4
170
166
- name : Setup Python
@@ -229,7 +225,7 @@ jobs:
229
225
# https://github.com/orgs/community/discussions/33579
230
226
success :
231
227
name : Unit tests successful
232
- runs-on : ubuntu-22 .04
228
+ runs-on : ubuntu-24 .04
233
229
if : always()
234
230
needs : [run-tests]
235
231
steps :
@@ -240,7 +236,7 @@ jobs:
240
236
jobs : ${{ toJSON(needs) }}
241
237
242
238
compile-warnings-report :
243
- runs-on : ubuntu-22 .04
239
+ runs-on : ubuntu-24 .04
244
240
needs : [run-tests]
245
241
steps :
246
242
- uses : actions/checkout@v4
@@ -268,7 +264,7 @@ jobs:
268
264
overwrite : true
269
265
270
266
merge-artifacts :
271
- runs-on : ubuntu-22 .04
267
+ runs-on : ubuntu-24 .04
272
268
needs : [compile-warnings-report]
273
269
steps :
274
270
- name : Merge Pytest Warnings JSON Artifacts
@@ -288,7 +284,7 @@ jobs:
288
284
# Combine and upload coverage reports.
289
285
coverage :
290
286
if : (github.repository == 'edx/edx-platform-private') || (github.repository == 'openedx/edx-platform' && (startsWith(github.base_ref, 'open-release') == false))
291
- runs-on : ubuntu-22 .04
287
+ runs-on : ubuntu-24 .04
292
288
needs : [run-tests]
293
289
strategy :
294
290
matrix :
0 commit comments