Skip to content

Commit 21bbffd

Browse files
authored
Merge branch 'master' into pwnage101/ENT-11563
2 parents 4c2d441 + ff0ffa1 commit 21bbffd

23 files changed

Lines changed: 311 additions & 1196 deletions

File tree

.github/workflows/unit-test-shards.json

Lines changed: 80 additions & 107 deletions
Original file line numberDiff line numberDiff line change
@@ -2,168 +2,169 @@
22
"lms-1": {
33
"settings": "lms.envs.test",
44
"paths": [
5-
"lms/djangoapps/branding/",
6-
"lms/djangoapps/bulk_email/",
7-
"lms/djangoapps/bulk_enroll/",
8-
"lms/djangoapps/bulk_user_retirement/",
9-
"lms/djangoapps/ccx/",
10-
"lms/djangoapps/certificates/",
11-
"lms/djangoapps/commerce/"
5+
"lms/djangoapps/discussion/rest_api/"
126
]
137
},
148
"lms-2": {
159
"settings": "lms.envs.test",
1610
"paths": [
11+
"lms/djangoapps/ccx/",
12+
"lms/djangoapps/commerce/",
1713
"lms/djangoapps/course_api/",
18-
"lms/djangoapps/course_blocks/",
19-
"lms/djangoapps/course_goals/",
20-
"lms/djangoapps/course_home_api/",
2114
"lms/djangoapps/course_wiki/",
22-
"lms/djangoapps/coursewarehistoryextended/",
23-
"lms/djangoapps/debug/"
15+
"lms/djangoapps/discussion/notification_prefs/",
16+
"lms/djangoapps/instructor_task/",
17+
"lms/djangoapps/ora_staff_grader/",
18+
"lms/djangoapps/survey/",
19+
"lms/djangoapps/teams/",
20+
"lms/djangoapps/verify_student/"
2421
]
2522
},
2623
"lms-3": {
2724
"settings": "lms.envs.test",
2825
"paths": [
29-
"lms/djangoapps/courseware/"
26+
"lms/djangoapps/branding/",
27+
"lms/djangoapps/bulk_enroll/",
28+
"lms/djangoapps/courseware/",
29+
"lms/djangoapps/instructor_analytics/",
30+
"lms/djangoapps/learner_dashboard/",
31+
"lms/djangoapps/lti_provider/",
32+
"lms/djangoapps/program_enrollments/"
3033
]
3134
},
3235
"lms-4": {
3336
"settings": "lms.envs.test",
3437
"paths": [
35-
"lms/djangoapps/discussion/",
36-
"lms/djangoapps/edxnotes/",
37-
"lms/djangoapps/experiments/"
38-
]
39-
},
40-
"lms-5": {
41-
"settings": "lms.envs.test",
42-
"paths": [
43-
"lms/djangoapps/gating/",
38+
"lms/djangoapps/bulk_user_retirement/",
39+
"lms/djangoapps/course_blocks/",
40+
"lms/djangoapps/course_goals/",
41+
"lms/djangoapps/course_home_api/",
42+
"lms/djangoapps/coursewarehistoryextended/",
43+
"lms/djangoapps/discussion/tests/",
44+
"lms/djangoapps/experiments/",
4445
"lms/djangoapps/grades/",
4546
"lms/djangoapps/instructor/",
46-
"lms/djangoapps/instructor_analytics/"
47+
"lms/djangoapps/mfe_config_api/",
48+
"lms/djangoapps/staticbook/",
49+
"lms/lib/"
4750
]
4851
},
49-
"lms-6": {
52+
"lms-5": {
5053
"settings": "lms.envs.test",
5154
"paths": [
52-
"lms/djangoapps/instructor_task/",
53-
"lms/djangoapps/learner_dashboard/",
55+
"lms/djangoapps/bulk_email/",
56+
"lms/djangoapps/certificates/",
57+
"lms/djangoapps/debug/",
58+
"lms/djangoapps/discussion/django_comment_client/",
59+
"lms/djangoapps/edxnotes/",
60+
"lms/djangoapps/gating/",
5461
"lms/djangoapps/learner_home/",
5562
"lms/djangoapps/lms_initialization/",
5663
"lms/djangoapps/lms_xblock/",
57-
"lms/djangoapps/lti_provider/",
5864
"lms/djangoapps/mailing/",
5965
"lms/djangoapps/mobile_api/",
6066
"lms/djangoapps/monitoring/",
61-
"lms/djangoapps/ora_staff_grader/",
62-
"lms/djangoapps/program_enrollments/",
6367
"lms/djangoapps/rss_proxy/",
6468
"lms/djangoapps/static_template_view/",
65-
"lms/djangoapps/staticbook/",
6669
"lms/djangoapps/support/",
67-
"lms/djangoapps/survey/",
68-
"lms/djangoapps/teams/",
6970
"lms/djangoapps/tests/",
7071
"lms/djangoapps/user_tours/",
71-
"lms/djangoapps/verify_student/",
72-
"lms/djangoapps/mfe_config_api/",
7372
"lms/envs/",
74-
"lms/lib/",
7573
"lms/tests.py"
7674
]
7775
},
78-
"openedx-1-with-lms": {
76+
"shared-with-lms-1": {
7977
"settings": "lms.envs.test",
8078
"paths": [
81-
"openedx/core/djangoapps/ace_common/",
82-
"openedx/core/djangoapps/cors_csrf/",
79+
"common/djangoapps/",
8380
"openedx/core/djangoapps/agreements/",
8481
"openedx/core/djangoapps/api_admin/",
82+
"openedx/core/djangoapps/authz/",
83+
"openedx/core/djangoapps/cache_toolbox/",
84+
"openedx/core/djangoapps/ccxcon/",
85+
"openedx/core/djangoapps/content/",
86+
"openedx/core/djangoapps/content_libraries/",
87+
"openedx/core/djangoapps/course_apps/",
88+
"openedx/core/djangoapps/credentials/",
89+
"openedx/core/djangoapps/credit/",
90+
"openedx/core/djangoapps/dark_lang/",
91+
"openedx/core/djangoapps/django_comment_common/",
92+
"openedx/core/djangoapps/embargo/",
93+
"openedx/core/djangoapps/header_control/",
94+
"openedx/core/djangoapps/heartbeat/",
95+
"openedx/core/djangoapps/models/",
96+
"openedx/core/djangoapps/notifications/",
97+
"openedx/core/djangoapps/oauth_dispatch/",
98+
"openedx/core/djangoapps/safe_sessions/",
99+
"openedx/core/djangoapps/schedules/",
100+
"openedx/core/djangoapps/user_api/",
101+
"openedx/core/djangoapps/util/",
102+
"openedx/core/djangoapps/video_pipeline/",
103+
"openedx/core/djangoapps/waffle_utils/",
104+
"openedx/core/djangoapps/xblock/",
105+
"openedx/core/tests/",
106+
"openedx/features/",
107+
"openedx/tests/"
108+
]
109+
},
110+
"shared-with-lms-2": {
111+
"settings": "lms.envs.test",
112+
"paths": [
113+
"openedx/core/djangoapps/ace_common/",
85114
"openedx/core/djangoapps/auth_exchange/",
86115
"openedx/core/djangoapps/bookmarks/",
87-
"openedx/core/djangoapps/cache_toolbox/",
88116
"openedx/core/djangoapps/catalog/",
89-
"openedx/core/djangoapps/ccxcon/",
90117
"openedx/core/djangoapps/commerce/",
91118
"openedx/core/djangoapps/common_initialization/",
92119
"openedx/core/djangoapps/common_views/",
93120
"openedx/core/djangoapps/config_model_utils/",
94-
"openedx/core/djangoapps/content/",
95-
"openedx/core/djangoapps/content_libraries/",
96121
"openedx/core/djangoapps/contentserver/",
97122
"openedx/core/djangoapps/cookie_metadata/",
98-
"openedx/core/djangoapps/course_apps/",
123+
"openedx/core/djangoapps/cors_csrf/",
99124
"openedx/core/djangoapps/course_date_signals/",
100125
"openedx/core/djangoapps/course_groups/",
126+
"openedx/core/djangoapps/course_live/",
101127
"openedx/core/djangoapps/courseware_api/",
102128
"openedx/core/djangoapps/crawlers/",
103-
"openedx/core/djangoapps/credentials/",
104-
"openedx/core/djangoapps/credit/",
105-
"openedx/core/djangoapps/course_live/",
106-
"openedx/core/djangoapps/dark_lang/",
107129
"openedx/core/djangoapps/debug/",
108130
"openedx/core/djangoapps/discussions/",
109-
"openedx/core/djangoapps/django_comment_common/",
110-
"openedx/core/djangoapps/embargo/",
111131
"openedx/core/djangoapps/enrollments/",
112-
"openedx/core/djangoapps/external_user_ids/"
113-
]
114-
},
115-
"openedx-2-with-lms": {
116-
"settings": "lms.envs.test",
117-
"paths": [
132+
"openedx/core/djangoapps/external_user_ids/",
118133
"openedx/core/djangoapps/geoinfo/",
119-
"openedx/core/djangoapps/header_control/",
120-
"openedx/core/djangoapps/heartbeat/",
121134
"openedx/core/djangoapps/lang_pref/",
122-
"openedx/core/djangoapps/models/",
123135
"openedx/core/djangoapps/monkey_patch/",
124-
"openedx/core/djangoapps/notifications/",
125-
"openedx/core/djangoapps/oauth_dispatch/",
126136
"openedx/core/djangoapps/olx_rest_api/",
127137
"openedx/core/djangoapps/password_policy/",
128138
"openedx/core/djangoapps/plugin_api/",
129139
"openedx/core/djangoapps/plugins/",
130140
"openedx/core/djangoapps/profile_images/",
131141
"openedx/core/djangoapps/programs/",
132-
"openedx/core/djangoapps/safe_sessions/",
133-
"openedx/core/djangoapps/schedules/",
134142
"openedx/core/djangoapps/service_status/",
135143
"openedx/core/djangoapps/session_inactivity_timeout/",
136144
"openedx/core/djangoapps/signals/",
137145
"openedx/core/djangoapps/site_configuration/",
138146
"openedx/core/djangoapps/system_wide_roles/",
139147
"openedx/core/djangoapps/theming/",
140-
"openedx/core/djangoapps/user_api/",
141148
"openedx/core/djangoapps/user_authn/",
142-
"openedx/core/djangoapps/util/",
143149
"openedx/core/djangoapps/verified_track_content/",
144150
"openedx/core/djangoapps/video_config/",
145-
"openedx/core/djangoapps/video_pipeline/",
146-
"openedx/core/djangoapps/waffle_utils/",
147-
"openedx/core/djangoapps/xblock/",
148151
"openedx/core/djangoapps/xmodule_django/",
149152
"openedx/core/djangoapps/zendesk_proxy/",
150-
"openedx/core/djangoapps/authz/",
151153
"openedx/core/djangolib/",
152154
"openedx/core/lib/",
153-
"openedx/core/tests/",
154-
"openedx/features/",
155155
"openedx/testing/",
156-
"openedx/tests/"
156+
"xmodule/"
157157
]
158158
},
159-
"openedx-1-with-cms": {
159+
"shared-with-cms-1": {
160160
"settings": "cms.envs.test",
161161
"paths": [
162+
"common/djangoapps/",
162163
"openedx/core/djangoapps/ace_common/",
163-
"openedx/core/djangoapps/cors_csrf/",
164164
"openedx/core/djangoapps/agreements/",
165165
"openedx/core/djangoapps/api_admin/",
166166
"openedx/core/djangoapps/auth_exchange/",
167+
"openedx/core/djangoapps/authz/",
167168
"openedx/core/djangoapps/bookmarks/",
168169
"openedx/core/djangoapps/cache_toolbox/",
169170
"openedx/core/djangoapps/catalog/",
@@ -175,8 +176,10 @@
175176
"openedx/core/djangoapps/content/",
176177
"openedx/core/djangoapps/content_libraries/",
177178
"openedx/core/djangoapps/content_staging/",
179+
"openedx/core/djangoapps/content_tagging/",
178180
"openedx/core/djangoapps/contentserver/",
179181
"openedx/core/djangoapps/cookie_metadata/",
182+
"openedx/core/djangoapps/cors_csrf/",
180183
"openedx/core/djangoapps/course_apps/",
181184
"openedx/core/djangoapps/course_date_signals/",
182185
"openedx/core/djangoapps/course_groups/",
@@ -190,13 +193,7 @@
190193
"openedx/core/djangoapps/django_comment_common/",
191194
"openedx/core/djangoapps/embargo/",
192195
"openedx/core/djangoapps/enrollments/",
193-
"openedx/core/djangoapps/external_user_ids/"
194-
]
195-
},
196-
"openedx-2-with-cms": {
197-
"settings": "cms.envs.test",
198-
"paths": [
199-
"openedx/core/djangoapps/content_tagging/",
196+
"openedx/core/djangoapps/external_user_ids/",
200197
"openedx/core/djangoapps/geoinfo/",
201198
"openedx/core/djangoapps/header_control/",
202199
"openedx/core/djangoapps/heartbeat/",
@@ -228,9 +225,9 @@
228225
"openedx/core/djangoapps/xblock/",
229226
"openedx/core/djangoapps/xmodule_django/",
230227
"openedx/core/djangoapps/zendesk_proxy/",
231-
"openedx/core/djangoapps/authz/",
232228
"openedx/core/lib/",
233-
"openedx/tests/"
229+
"openedx/tests/",
230+
"xmodule/"
234231
]
235232
},
236233
"cms-1": {
@@ -240,8 +237,8 @@
240237
"cms/djangoapps/cms_user_tasks/",
241238
"cms/djangoapps/course_creators/",
242239
"cms/djangoapps/export_course_metadata/",
243-
"cms/djangoapps/modulestore_migrator/",
244240
"cms/djangoapps/models/",
241+
"cms/djangoapps/modulestore_migrator/",
245242
"cms/djangoapps/pipeline_js/",
246243
"cms/djangoapps/xblock_config/",
247244
"cms/envs/",
@@ -253,29 +250,5 @@
253250
"paths": [
254251
"cms/djangoapps/contentstore/"
255252
]
256-
},
257-
"common-with-lms": {
258-
"settings": "lms.envs.test",
259-
"paths": [
260-
"common/djangoapps/"
261-
]
262-
},
263-
"common-with-cms": {
264-
"settings": "cms.envs.test",
265-
"paths": [
266-
"common/djangoapps/"
267-
]
268-
},
269-
"xmodule-with-lms": {
270-
"settings": "lms.envs.test",
271-
"paths": [
272-
"xmodule/"
273-
]
274-
},
275-
"xmodule-with-cms": {
276-
"settings": "cms.envs.test",
277-
"paths": [
278-
"xmodule/"
279-
]
280253
}
281254
}

.github/workflows/unit-tests.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,25 +25,21 @@ jobs:
2525
- "3.12"
2626
django-version:
2727
- "pinned"
28-
# When updating the shards, remember to make the same changes in
29-
# .github/workflows/unit-tests-gh-hosted.yml
3028
shard_name:
3129
- "lms-1"
3230
- "lms-2"
3331
- "lms-3"
3432
- "lms-4"
3533
- "lms-5"
36-
- "lms-6"
37-
- "openedx-1-with-lms"
38-
- "openedx-2-with-lms"
39-
- "openedx-1-with-cms"
40-
- "openedx-2-with-cms"
34+
- "shared-with-lms-1"
35+
- "shared-with-lms-2"
36+
# Note: The shared-with-cms-1 shard is currently a subset of both
37+
# shared-with-lms-1 and shared-with-lms-2. Some shared tests are
38+
# not run -with-cms at all.
39+
# https://github.com/openedx/openedx-platform/issues/38355
40+
- "shared-with-cms-1"
4141
- "cms-1"
4242
- "cms-2"
43-
- "common-with-lms"
44-
- "common-with-cms"
45-
- "xmodule-with-lms"
46-
- "xmodule-with-cms"
4743
mongo-version:
4844
- "7.0"
4945
os-version:
@@ -115,11 +111,25 @@ jobs:
115111
shell: bash
116112
run: |
117113
echo "unit_test_paths=$(python scripts/unit_test_shards_parser.py --shard-name=${{ matrix.shard_name }} )" >> $GITHUB_ENV
114+
if [[ "${{ github.ref }}" == "refs/heads/master" ]]; then
115+
echo "report_log_arg=--report-log=reports/pytest-report-${{ matrix.shard_name }}.jsonl" >> $GITHUB_ENV
116+
else
117+
echo "report_log_arg=" >> $GITHUB_ENV
118+
fi
118119
119120
- name: run tests
120121
shell: bash
121122
run: |
122-
python -Wd -m pytest -p no:randomly --ds=${{ env.settings_path }} ${{ env.unit_test_paths }} --cov=.
123+
python -Wd -m pytest -p no:randomly --ds=${{ env.settings_path }} ${{ env.unit_test_paths }} --cov=. \
124+
${{ env.report_log_arg }}
125+
126+
- name: Upload pytest timing report
127+
if: github.ref == 'refs/heads/master'
128+
uses: actions/upload-artifact@v7
129+
with:
130+
name: pytest-report-${{ matrix.shard_name }}-${{ matrix.python-version }}-${{ matrix.django-version }}-${{ matrix.mongo-version }}-${{ matrix.os-version }}
131+
path: reports/pytest-report-${{ matrix.shard_name }}.jsonl
132+
overwrite: true
123133

124134
- name: rename warnings json file
125135
if: success()

0 commit comments

Comments
 (0)