@@ -15,7 +15,7 @@ concurrency:
1515jobs :
1616 run-tests :
1717 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 }}
1919 strategy :
2020 matrix :
2121 python-version :
@@ -43,22 +43,27 @@ jobs:
4343 - " xmodule-with-cms"
4444 mongo-version :
4545 - " 7.0"
46+ os-version :
47+ - ubuntu-24.04
4648
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.
5053 #
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"
6267
6368 steps :
6469 - name : checkout repo
@@ -90,19 +95,10 @@ jobs:
9095 activate = 1
9196 EOF
9297
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/mongodb-github-action@1.11.0
100+ with :
101+ mongodb-version : ${{ matrix.mongo-version }}
106102
107103 - name : Setup Python
108104 uses : actions/setup-python@v5
@@ -164,7 +160,7 @@ jobs:
164160 overwrite : true
165161
166162 collect-and-verify :
167- runs-on : ubuntu-22 .04
163+ runs-on : ubuntu-24 .04
168164 steps :
169165 - uses : actions/checkout@v4
170166 - name : Setup Python
@@ -229,7 +225,7 @@ jobs:
229225 # https://github.com/orgs/community/discussions/33579
230226 success :
231227 name : Unit tests successful
232- runs-on : ubuntu-22 .04
228+ runs-on : ubuntu-24 .04
233229 if : always()
234230 needs : [run-tests]
235231 steps :
@@ -240,7 +236,7 @@ jobs:
240236 jobs : ${{ toJSON(needs) }}
241237
242238 compile-warnings-report :
243- runs-on : ubuntu-22 .04
239+ runs-on : ubuntu-24 .04
244240 needs : [run-tests]
245241 steps :
246242 - uses : actions/checkout@v4
@@ -268,7 +264,7 @@ jobs:
268264 overwrite : true
269265
270266 merge-artifacts :
271- runs-on : ubuntu-22 .04
267+ runs-on : ubuntu-24 .04
272268 needs : [compile-warnings-report]
273269 steps :
274270 - name : Merge Pytest Warnings JSON Artifacts
@@ -288,7 +284,7 @@ jobs:
288284 # Combine and upload coverage reports.
289285 coverage :
290286 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
292288 needs : [run-tests]
293289 strategy :
294290 matrix :
0 commit comments