Skip to content

Commit

Permalink
Merge branch 'master' into feat/master/course-about-page-markup
Browse files Browse the repository at this point in the history
  • Loading branch information
ihor-romaniuk authored May 23, 2024
2 parents c9afaa7 + 41fa968 commit 6fb2562
Show file tree
Hide file tree
Showing 378 changed files with 39,232 additions and 39,070 deletions.
10 changes: 5 additions & 5 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

# Ensure that the team responsible for upgrades sees any PRs that would
# add GitHub-hosted dependencies to that platform.
requirements/edx/github.in @openedx/arbi-bom
requirements/edx/github.in @openedx/2u-arbi-bom

# Core
common/djangoapps/student/
common/djangoapps/student/models/__init__.py @openedx/teaching-and-learning
common/djangoapps/student/models/course_enrollment.py @openedx/teaching-and-learning
common/djangoapps/student/models/__init__.py @openedx/2u-tnl
common/djangoapps/student/models/course_enrollment.py @openedx/2u-tnl
common/djangoapps/third_party_auth/
lms/djangoapps/course_api/blocks
lms/djangoapps/courseware/
Expand Down Expand Up @@ -47,8 +47,8 @@ openedx/features/discounts/

# Ping Axim On-call if someone uses the QuickStart
# https://docs.openedx.org/en/latest/developers/quickstarts/first_openedx_pr.html
lms/templates/dashboard.html @openedx/axim-oncall
lms/templates/dashboard.html @openedx/axim-oncall

# Ensure minimal.yml stays minimal, this could be a team in the future
# but it's just me for now, others can sign up if they care as well.
lms/envs/minimal.yml @feanil
lms/envs/minimal.yml @feanil
8 changes: 4 additions & 4 deletions .github/actions/verify-tests-count/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ runs:
- name: collect tests from all modules
shell: bash
run: |
echo "root_cms_unit_tests_count=$(pytest --collect-only --ds=cms.envs.test cms/ -q | head -n -2 | wc -l)" >> $GITHUB_ENV
echo "root_lms_unit_tests_count=$(pytest --collect-only --ds=lms.envs.test lms/ openedx/ common/djangoapps/ xmodule/ -q | head -n -2 | wc -l)" >> $GITHUB_ENV
echo "root_cms_unit_tests_count=$(pytest --disable-warnings --collect-only --ds=cms.envs.test cms/ -q | head -n -2 | wc -l)" >> $GITHUB_ENV
echo "root_lms_unit_tests_count=$(pytest --disable-warnings --collect-only --ds=lms.envs.test lms/ openedx/ common/djangoapps/ xmodule/ pavelib/ -q | head -n -2 | wc -l)" >> $GITHUB_ENV
- name: get GHA unit test paths
shell: bash
Expand All @@ -19,8 +19,8 @@ runs:
- name: collect tests from GHA unit test shards
shell: bash
run: |
echo "cms_unit_tests_count=$(pytest --collect-only --ds=cms.envs.test ${{ env.cms_unit_test_paths }} -q | head -n -2 | wc -l)" >> $GITHUB_ENV
echo "lms_unit_tests_count=$(pytest --collect-only --ds=lms.envs.test ${{ env.lms_unit_test_paths }} -q | head -n -2 | wc -l)" >> $GITHUB_ENV
echo "cms_unit_tests_count=$(pytest --disable-warnings --collect-only --ds=cms.envs.test ${{ env.cms_unit_test_paths }} -q | head -n -2 | wc -l)" >> $GITHUB_ENV
echo "lms_unit_tests_count=$(pytest --disable-warnings --collect-only --ds=lms.envs.test ${{ env.lms_unit_test_paths }} -q | head -n -2 | wc -l)" >> $GITHUB_ENV
- name: add unit tests count
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-consistent-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
echo $'Paths touched in PR:\n'"$paths"
# The ^"? is because git may quote weird file paths
matched="$(echo "$paths" | grep -P '^"?requirements/' || true)"
matched="$(echo "$paths" | grep -P '^"?((requirements/)|(scripts/.*?/requirements/))' || true)"
echo $'Relevant paths:\n'"$matched"
if [[ -n "$matched" ]]; then
echo "RELEVANT=true" >> "$GITHUB_ENV"
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/ci-static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8']
python-version:
- '3.11'
os: ['ubuntu-20.04']

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
- name: Set up Python environment
uses: actions/setup-python@v4
with:
python-version: "3.8"
python-version: "3.11"

- name: Run make compile-requirements
env:
Expand Down
13 changes: 7 additions & 6 deletions .github/workflows/js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
node-version: [ 16 ]
python-version: [ 3.8 ]
node-version: [ 18 ]
python-version:
- '3.11'

steps:

Expand All @@ -28,13 +29,13 @@ jobs:
node-version: ${{ matrix.node-version }}

- name: Setup npm
run: npm i -g npm@8.5.x
run: npm i -g npm@10.5.x

- name: Install Firefox 61.0
- name: Install Firefox 123.0
run: |
sudo apt-get purge firefox
wget "https://ftp.mozilla.org/pub/firefox/releases/61.0/linux-x86_64/en-US/firefox-61.0.tar.bz2"
tar -xjf firefox-61.0.tar.bz2
wget "https://ftp.mozilla.org/pub/firefox/releases/123.0/linux-x86_64/en-US/firefox-123.0.tar.bz2"
tar -xjf firefox-123.0.tar.bz2
sudo mv firefox /opt/firefox
sudo ln -s /opt/firefox/firefox /usr/bin/firefox
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint-imports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: '3.11'

- name: Install system requirements
run: sudo apt update && sudo apt install -y libxmlsec1-dev
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lockfileversion-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ on:

jobs:
version-check:
uses: openedx/.github/.github/workflows/lockfileversion-check.yml@master
uses: openedx/.github/.github/workflows/lockfileversion-check-v3.yml@master
10 changes: 6 additions & 4 deletions .github/workflows/migrations-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
python-version: [ 3.8 ]
python-version:
- '3.11'
# 'pinned' is used to install the latest patch version of Django
# within the global constraint i.e. Django==4.2.8 in current case
# because we have global constraint of Django<4.2
# because we have global constraint of Django<4.2
django-version: ["pinned"]
mongo-version: ["4", "7"]
mongo-version:
- "7"
mysql-version: ["8"]
services:
mongo:
Expand Down Expand Up @@ -115,7 +117,7 @@ jobs:
./manage.py lms migrate
echo "Running the CMS migrations."
./manage.py cms migrate
# This job aggregates test results. It's the required check for branch protection.
# https://github.com/marketplace/actions/alls-green#why
# https://github.com/orgs/community/discussions/33579
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish-ci-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Log in to ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
uses: aws-actions/amazon-ecr-login@v2

- name: Build, tag, and push image to Amazon ECR
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/pylint-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- module-name: openedx-2
path: "--django-settings-module=lms.envs.test openedx/core/djangoapps/geoinfo/ openedx/core/djangoapps/header_control/ openedx/core/djangoapps/heartbeat/ openedx/core/djangoapps/lang_pref/ openedx/core/djangoapps/models/ openedx/core/djangoapps/monkey_patch/ openedx/core/djangoapps/oauth_dispatch/ openedx/core/djangoapps/olx_rest_api/ openedx/core/djangoapps/password_policy/ openedx/core/djangoapps/plugin_api/ openedx/core/djangoapps/plugins/ openedx/core/djangoapps/profile_images/ openedx/core/djangoapps/programs/ openedx/core/djangoapps/safe_sessions/ openedx/core/djangoapps/schedules/ openedx/core/djangoapps/service_status/ openedx/core/djangoapps/session_inactivity_timeout/ openedx/core/djangoapps/signals/ openedx/core/djangoapps/site_configuration/ openedx/core/djangoapps/system_wide_roles/ openedx/core/djangoapps/theming/ openedx/core/djangoapps/user_api/ openedx/core/djangoapps/user_authn/ openedx/core/djangoapps/util/ openedx/core/djangoapps/verified_track_content/ openedx/core/djangoapps/video_config/ openedx/core/djangoapps/video_pipeline/ openedx/core/djangoapps/waffle_utils/ openedx/core/djangoapps/xblock/ openedx/core/djangoapps/xmodule_django/ openedx/core/tests/ openedx/features/ openedx/testing/ openedx/tests/ openedx/core/djangoapps/learner_pathway/ openedx/core/djangoapps/notifications/ openedx/core/djangoapps/staticfiles/ openedx/core/djangoapps/content_tagging/"
- module-name: common
path: "--django-settings-module=lms.envs.test common"
path: "--django-settings-module=lms.envs.test common pavelib"
- module-name: cms
path: "--django-settings-module=cms.envs.test cms"
- module-name: xmodule
Expand All @@ -39,7 +39,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.11

- name: Get pip cache dir
id: pip-cache-dir
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/quality-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,9 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
python-version: [ 3.8 ]
node-version: [ 16 ]
python-version:
- '3.11'
node-version: [ 18 ]

steps:

Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
strategy:
matrix:
os: [ "ubuntu-20.04" ]
python-version: [ "3.8" ]
python-version:
- '3.11'

steps:
- uses: actions/checkout@v3
Expand Down
40 changes: 30 additions & 10 deletions .github/workflows/static-assets-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,12 @@ jobs:
strategy:
matrix:
os: [ ubuntu-20.04 ]
python-version: [ 3.8 ]
node-version: [ 16 ]
npm-version: [ 8.5.x ]
mongo-version: ["4.4", "7.0"]
python-version:
- '3.11'
node-version: [ 18 ]
npm-version: [ 10.5.x ]
mongo-version:
- "7.0"

services:
mongo:
Expand Down Expand Up @@ -66,21 +68,39 @@ jobs:
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
restore-keys: ${{ runner.os }}-pip-

- name: Install Required Python Dependencies
- name: Install Limited Python Deps for Build
run: |
make base-requirements
pip install -r requirements/edx/assets.txt
- name: Initiate Mongo DB Service
run: sudo systemctl start mongod

- name: Add node_modules bin to $Path
run: echo $GITHUB_WORKSPACE/node_modules/.bin >> $GITHUB_PATH

- name: Run Static Assets Check
- name: Check Dev Assets Build
env:
COMPREHENSIVE_THEMES_DIR: ./themes
run: |
npm clean-install --dev
npm run build-dev
- name: Check Prod Assets Build
env:
COMPREHENSIVE_THEMES_DIR: ./themes
run: |
npm clean-install
npm run build
- name: Install Full Python Deps for Collection
run: |
pip install -r requirements/edx/base.txt -e .
- name: Check Assets Collection
env:
LMS_CFG: lms/envs/minimal.yml
CMS_CFG: lms/envs/minimal.yml

DJANGO_SETTINGS_MODULE: lms.envs.production
run: |
paver update_assets lms --theme-dirs ./themes
paver update_assets cms --theme-dirs ./themes
./manage.py lms collectstatic --noinput
./manage.py cms collectstatic --noinput
6 changes: 4 additions & 2 deletions .github/workflows/unit-test-shards.json
Original file line number Diff line number Diff line change
Expand Up @@ -259,13 +259,15 @@
"common-with-lms": {
"settings": "lms.envs.test",
"paths": [
"common/djangoapps/"
"common/djangoapps/",
"pavelib/"
]
},
"common-with-cms": {
"settings": "cms.envs.test",
"paths": [
"common/djangoapps/"
"common/djangoapps/",
"pavelib/"
]
},
"xmodule-with-lms": {
Expand Down
25 changes: 20 additions & 5 deletions .github/workflows/unit-tests-gh-hosted.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ on:

jobs:
run-test:
name: ${{ matrix.shard_name }}(py=${{ matrix.python-version }},dj=${{ matrix.django-version }},mongo=${{ matrix.mongo-version }})
if: (github.repository != 'openedx/edx-platform' && github.repository != 'edx/edx-platform-private') || (github.repository == 'openedx/edx-platform' && (startsWith(github.base_ref, 'open-release') == true))
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python-version: [ '3.8' ]
python-version:
- "3.11"
django-version:
- "pinned"
# When updating the shards, remember to make the same changes in
Expand All @@ -37,9 +38,23 @@ jobs:
- "xmodule-with-lms"
- "xmodule-with-cms"
mongo-version:
- "4.4"
- "7.0"
name: gh-hosted-python-${{ matrix.python-version }},django-${{ matrix.django-version }},mongo-${{ matrix.mongo-version }}${{ matrix.shard_name }}

# We only need to test older versions of Mongo with modules that directly interface with Mongo (that is: xmodule.modulestore)
# This code is left here as an example for future refernce in case we need to reduce the number of shards we're
# testing but still have good confidence with older versions of mongo. We use Mongo 4.4 in the example.
#
# exclude:
# - mongo-version: "4.4"
# include:
# - shard_name: "xmodule-with-cms"
# python-version: "3.11"
# django-version: "pinned"
# mongo-version: "4.4"
# - shard_name: "xmodule-with-lms"
# python-version: "3.11"
# django-version: "pinned"
# mongo-version: "4.4"
steps:
- uses: actions/checkout@v2

Expand Down Expand Up @@ -87,7 +102,7 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [ '3.8' ]
python-version: [ '3.11' ]
django-version:
- "pinned"
steps:
Expand Down
Loading

0 comments on commit 6fb2562

Please sign in to comment.