@@ -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 : ${{ matrix.os-version }}
18
+ runs-on : ubuntu-22.04
19
19
strategy :
20
20
matrix :
21
21
python-version :
@@ -43,27 +43,22 @@ jobs:
43
43
- " xmodule-with-cms"
44
44
mongo-version :
45
45
- " 7.0"
46
- os-version :
47
- - ubuntu-24.04
48
46
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.
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.
53
50
#
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"
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"
67
62
68
63
steps :
69
64
- name : checkout repo
@@ -95,10 +90,19 @@ jobs:
95
90
activate = 1
96
91
EOF
97
92
98
- - name : Start MongoDB
99
- uses :
supercharge/[email protected]
100
- with :
101
- mongodb-version : ${{ matrix.mongo-version }}
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 &
102
106
103
107
- name : Setup Python
104
108
uses : actions/setup-python@v5
@@ -160,7 +164,7 @@ jobs:
160
164
overwrite : true
161
165
162
166
collect-and-verify :
163
- runs-on : ubuntu-24 .04
167
+ runs-on : ubuntu-22 .04
164
168
steps :
165
169
- uses : actions/checkout@v4
166
170
- name : Setup Python
@@ -225,7 +229,7 @@ jobs:
225
229
# https://github.com/orgs/community/discussions/33579
226
230
success :
227
231
name : Unit tests successful
228
- runs-on : ubuntu-24 .04
232
+ runs-on : ubuntu-22 .04
229
233
if : always()
230
234
needs : [run-tests]
231
235
steps :
@@ -236,7 +240,7 @@ jobs:
236
240
jobs : ${{ toJSON(needs) }}
237
241
238
242
compile-warnings-report :
239
- runs-on : ubuntu-24 .04
243
+ runs-on : ubuntu-22 .04
240
244
needs : [run-tests]
241
245
steps :
242
246
- uses : actions/checkout@v4
@@ -264,7 +268,7 @@ jobs:
264
268
overwrite : true
265
269
266
270
merge-artifacts :
267
- runs-on : ubuntu-24 .04
271
+ runs-on : ubuntu-22 .04
268
272
needs : [compile-warnings-report]
269
273
steps :
270
274
- name : Merge Pytest Warnings JSON Artifacts
@@ -284,7 +288,7 @@ jobs:
284
288
# Combine and upload coverage reports.
285
289
coverage :
286
290
if : (github.repository == 'edx/edx-platform-private') || (github.repository == 'openedx/edx-platform' && (startsWith(github.base_ref, 'open-release') == false))
287
- runs-on : ubuntu-24 .04
291
+ runs-on : ubuntu-22 .04
288
292
needs : [run-tests]
289
293
strategy :
290
294
matrix :
0 commit comments