chore: cleanup
- rst heading definitions - indirect hyperlinks and code-blocks added for better readability - MarkDown warnings resolved - Yaml style issues fixed
This commit is contained in:
4
.github/actions/unit-tests/action.yml
vendored
4
.github/actions/unit-tests/action.yml
vendored
@@ -1,5 +1,5 @@
|
||||
name: 'Run unit tests'
|
||||
description: 'shared steps to run unit tests on both Github hosted and self hosted runners.'
|
||||
name: "Run unit tests"
|
||||
description: "shared steps to run unit tests on both Github hosted and self hosted runners."
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
name: 'Verify unit tests count'
|
||||
description: 'shared steps to verify unit tests count on both Github hosted and self hosted runners.'
|
||||
name: "Verify unit tests count"
|
||||
description: "shared steps to verify unit tests count on both Github hosted and self hosted runners."
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
@@ -15,14 +15,12 @@ runs:
|
||||
echo "cms_unit_test_paths=$(python scripts/gha_unit_tests_collector.py --cms-only)" >> $GITHUB_ENV
|
||||
echo "lms_unit_test_paths=$(python scripts/gha_unit_tests_collector.py --lms-only)" >> $GITHUB_ENV
|
||||
|
||||
|
||||
- name: collect tests from GHA unit test shards
|
||||
shell: bash
|
||||
run: |
|
||||
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
|
||||
shell: bash
|
||||
run: |
|
||||
|
||||
2
.github/pull_request_template.md
vendored
2
.github/pull_request_template.md
vendored
@@ -21,6 +21,7 @@ Design decisions and their rationales should be documented in the repo (docstrin
|
||||
linked here.
|
||||
|
||||
Useful information to include:
|
||||
|
||||
- Which edX user roles will this change impact? Common user roles are "Learner", "Course Author",
|
||||
"Developer", and "Operator".
|
||||
- Include screenshots for changes to the UI (ideally, both "before" and "after" screenshots, if applicable).
|
||||
@@ -43,6 +44,7 @@ Please provide detailed step-by-step instructions for testing this change.
|
||||
## Other information
|
||||
|
||||
Include anything else that will help reviewers and consumers understand the change.
|
||||
|
||||
- Does this change depend on other changes elsewhere?
|
||||
- Any special concerns or limitations? For example: deprecations, migrations, security, or accessibility.
|
||||
- If your [database migration](https://openedx.atlassian.net/wiki/spaces/AC/pages/23003228/Everything+About+Database+Migrations) can't be rolled back easily.
|
||||
|
||||
@@ -17,4 +17,3 @@ on:
|
||||
jobs:
|
||||
add_remove_labels:
|
||||
uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
- uses: actions/setup-python@v5
|
||||
if: ${{ env.RELEVANT == 'true' }}
|
||||
with:
|
||||
python-version: '3.8'
|
||||
python-version: "3.8"
|
||||
|
||||
- name: "Recompile requirements"
|
||||
if: ${{ env.RELEVANT == 'true' }}
|
||||
|
||||
4
.github/workflows/check-for-tutorial-prs.yml
vendored
4
.github/workflows/check-for-tutorial-prs.yml
vendored
@@ -14,7 +14,7 @@ on:
|
||||
pull_request:
|
||||
types: [opened]
|
||||
paths:
|
||||
- 'lms/templates/dashboard.html'
|
||||
- "lms/templates/dashboard.html"
|
||||
|
||||
jobs:
|
||||
# Provide helpful bot comment
|
||||
@@ -32,4 +32,4 @@ jobs:
|
||||
Thank you for your pull request! Congratulations on completing the Open edX tutorial! A team member will be by to take a look shortly.
|
||||
To those watching community pull requests: No need to worry about this one, a tCRIL team member will be taking care of it.
|
||||
For this PR's author: If this is a PR that is NOT coming from the Open edX tutorial, please comment and let us know to disregard this message.
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
4
.github/workflows/ci-static-analysis.yml
vendored
4
.github/workflows/ci-static-analysis.yml
vendored
@@ -9,8 +9,8 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- '3.11'
|
||||
os: ['ubuntu-20.04']
|
||||
- "3.11"
|
||||
os: ["ubuntu-20.04"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
@@ -4,9 +4,9 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Target branch to create requirements PR against'
|
||||
description: "Target branch to create requirements PR against"
|
||||
required: true
|
||||
default: 'master'
|
||||
default: "master"
|
||||
type: string
|
||||
|
||||
defaults:
|
||||
|
||||
13
.github/workflows/docker-publish.yml
vendored
13
.github/workflows/docker-publish.yml
vendored
@@ -9,8 +9,8 @@ jobs:
|
||||
# See also https://docs.docker.com/docker-hub/builds/
|
||||
push:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event_name == 'push'
|
||||
|
||||
if: github.event_name == 'push'
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
variant:
|
||||
@@ -32,12 +32,11 @@ jobs:
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
|
||||
- name: Build and push lms base docker image
|
||||
env:
|
||||
DOCKERHUB_PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }}
|
||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
run : make docker_tag_build_push_${{matrix.variant}}
|
||||
|
||||
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
run: make docker_tag_build_push_${{matrix.variant}}
|
||||
|
||||
115
.github/workflows/js-tests.yml
vendored
115
.github/workflows/js-tests.yml
vendored
@@ -12,74 +12,73 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-20.04 ]
|
||||
node-version: [ 18 ]
|
||||
os: [ubuntu-20.04]
|
||||
node-version: [18]
|
||||
python-version:
|
||||
- '3.11'
|
||||
- "3.11"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Fetch master to compare coverage
|
||||
run: git fetch --depth=1 origin master
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
- name: Fetch master to compare coverage
|
||||
run: git fetch --depth=1 origin master
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@10.5.x
|
||||
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@10.5.x
|
||||
- name: Install Firefox 123.0
|
||||
run: |
|
||||
sudo apt-get purge firefox
|
||||
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
|
||||
|
||||
- name: Install Firefox 123.0
|
||||
run: |
|
||||
sudo apt-get purge firefox
|
||||
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
|
||||
- name: Install Required System Packages
|
||||
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev ubuntu-restricted-extras xvfb
|
||||
|
||||
- name: Install Required System Packages
|
||||
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev ubuntu-restricted-extras xvfb
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/base.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/base.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
- name: Install Required Python Dependencies
|
||||
run: |
|
||||
make base-requirements
|
||||
|
||||
- name: Install Required Python Dependencies
|
||||
run: |
|
||||
make base-requirements
|
||||
- uses: c-hive/gha-npm-cache@v1
|
||||
- name: Run JS Tests
|
||||
env:
|
||||
TEST_SUITE: js-unit
|
||||
SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh
|
||||
run: |
|
||||
npm install -g jest
|
||||
xvfb-run --auto-servernum ./scripts/all-tests.sh
|
||||
|
||||
- uses: c-hive/gha-npm-cache@v1
|
||||
- name: Run JS Tests
|
||||
env:
|
||||
TEST_SUITE: js-unit
|
||||
SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh
|
||||
run: |
|
||||
npm install -g jest
|
||||
xvfb-run --auto-servernum ./scripts/all-tests.sh
|
||||
|
||||
- name: Save Job Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Artifacts
|
||||
path: |
|
||||
reports/**/*
|
||||
test_root/log/*.png
|
||||
test_root/log/*.log
|
||||
**/TEST-*.xml
|
||||
overwrite: true
|
||||
- name: Save Job Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Artifacts
|
||||
path: |
|
||||
reports/**/*
|
||||
test_root/log/*.png
|
||||
test_root/log/*.log
|
||||
**/TEST-*.xml
|
||||
overwrite: true
|
||||
|
||||
3
.github/workflows/lint-imports.yml
vendored
3
.github/workflows/lint-imports.yml
vendored
@@ -7,7 +7,6 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
|
||||
lint-imports:
|
||||
name: Lint Python Imports
|
||||
runs-on: ubuntu-20.04
|
||||
@@ -19,7 +18,7 @@ jobs:
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.11'
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install system requirements
|
||||
run: sudo apt update && sudo apt install -y libxmlsec1-dev
|
||||
|
||||
2
.github/workflows/lockfileversion-check.yml
vendored
2
.github/workflows/lockfileversion-check.yml
vendored
@@ -5,7 +5,7 @@ name: Lockfile Version check
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- master
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
|
||||
120
.github/workflows/migrations-check.yml
vendored
120
.github/workflows/migrations-check.yml
vendored
@@ -13,9 +13,9 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-20.04 ]
|
||||
os: [ubuntu-20.04]
|
||||
python-version:
|
||||
- '3.11'
|
||||
- "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
|
||||
@@ -50,73 +50,73 @@ jobs:
|
||||
--health-timeout 5s
|
||||
--health-retries 3
|
||||
steps:
|
||||
- name: Setup mongodb user
|
||||
run: |
|
||||
mongosh edxapp --eval '
|
||||
db.createUser(
|
||||
{
|
||||
user: "edxapp",
|
||||
pwd: "password",
|
||||
roles: [
|
||||
{ role: "readWrite", db: "edxapp" },
|
||||
]
|
||||
}
|
||||
);
|
||||
'
|
||||
- name: Setup mongodb user
|
||||
run: |
|
||||
mongosh edxapp --eval '
|
||||
db.createUser(
|
||||
{
|
||||
user: "edxapp",
|
||||
pwd: "password",
|
||||
roles: [
|
||||
{ role: "readWrite", db: "edxapp" },
|
||||
]
|
||||
}
|
||||
);
|
||||
'
|
||||
|
||||
- name: Verify mongo and mysql db credentials
|
||||
run: |
|
||||
mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp
|
||||
mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp
|
||||
- name: Verify mongo and mysql db credentials
|
||||
run: |
|
||||
mysql -h 127.0.0.1 -uedxapp001 -ppassword -e "select 1;" edxapp
|
||||
mongosh --host 127.0.0.1 --username edxapp --password password --eval 'use edxapp; db.adminCommand("ping");' edxapp
|
||||
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install system Packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
make ubuntu-requirements
|
||||
- name: Install system Packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
make ubuntu-requirements
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
make dev-requirements
|
||||
if [[ "${{ matrix.django-version }}" != "pinned" ]]; then
|
||||
pip install "django~=${{ matrix.django-version }}.0"
|
||||
pip check # fail if this test-reqs/Django combination is broken
|
||||
fi
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
make dev-requirements
|
||||
if [[ "${{ matrix.django-version }}" != "pinned" ]]; then
|
||||
pip install "django~=${{ matrix.django-version }}.0"
|
||||
pip check # fail if this test-reqs/Django combination is broken
|
||||
fi
|
||||
|
||||
- name: list installed package versions
|
||||
run: |
|
||||
sudo pip freeze
|
||||
- name: list installed package versions
|
||||
run: |
|
||||
sudo pip freeze
|
||||
|
||||
- name: Run Tests
|
||||
env:
|
||||
LMS_CFG: lms/envs/minimal.yml
|
||||
# This is from the LMS dir on purpose since we don't need anything different for the CMS yet.
|
||||
STUDIO_CFG: lms/envs/minimal.yml
|
||||
run: |
|
||||
echo "Running the LMS migrations."
|
||||
./manage.py lms migrate
|
||||
echo "Running the CMS migrations."
|
||||
./manage.py cms migrate
|
||||
- name: Run Tests
|
||||
env:
|
||||
LMS_CFG: lms/envs/minimal.yml
|
||||
# This is from the LMS dir on purpose since we don't need anything different for the CMS yet.
|
||||
STUDIO_CFG: lms/envs/minimal.yml
|
||||
run: |
|
||||
echo "Running the LMS migrations."
|
||||
./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
|
||||
|
||||
@@ -41,4 +41,3 @@ jobs:
|
||||
run: |
|
||||
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -f scripts/ci-runner.Dockerfile .
|
||||
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
|
||||
|
||||
|
||||
109
.github/workflows/quality-checks.yml
vendored
109
.github/workflows/quality-checks.yml
vendored
@@ -13,71 +13,70 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-20.04 ]
|
||||
os: [ubuntu-20.04]
|
||||
python-version:
|
||||
- '3.11'
|
||||
node-version: [ 18 ]
|
||||
- "3.11"
|
||||
node-version: [18]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 2
|
||||
- name: Fetch base branch for comparison
|
||||
run: git fetch --depth=1 origin ${{ github.base_ref }}
|
||||
|
||||
- name: Fetch base branch for comparison
|
||||
run: git fetch --depth=1 origin ${{ github.base_ref }}
|
||||
- name: Install Required System Packages
|
||||
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev
|
||||
|
||||
- name: Install Required System Packages
|
||||
run: sudo apt-get update && sudo apt-get install libxmlsec1-dev
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@8.5.x
|
||||
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@8.5.x
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/testing.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/testing.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
- name: Install Required Python Dependencies
|
||||
env:
|
||||
PIP_SRC: ${{ runner.temp }}
|
||||
run: |
|
||||
make test-requirements
|
||||
|
||||
- name: Install Required Python Dependencies
|
||||
env:
|
||||
PIP_SRC: ${{ runner.temp }}
|
||||
run: |
|
||||
make test-requirements
|
||||
- name: Run Quality Tests
|
||||
env:
|
||||
TEST_SUITE: quality
|
||||
SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh
|
||||
PIP_SRC: ${{ runner.temp }}
|
||||
TARGET_BRANCH: ${{ github.base_ref }}
|
||||
run: |
|
||||
./scripts/all-tests.sh
|
||||
|
||||
- name: Run Quality Tests
|
||||
env:
|
||||
TEST_SUITE: quality
|
||||
SCRIPT_TO_RUN: ./scripts/generic-ci-tests.sh
|
||||
PIP_SRC: ${{ runner.temp }}
|
||||
TARGET_BRANCH: ${{ github.base_ref }}
|
||||
run: |
|
||||
./scripts/all-tests.sh
|
||||
|
||||
- name: Save Job Artifacts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Artifacts
|
||||
path: |
|
||||
**/reports/**/*
|
||||
test_root/log/**/*.log
|
||||
*.log
|
||||
overwrite: true
|
||||
- name: Save Job Artifacts
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: Build-Artifacts
|
||||
path: |
|
||||
**/reports/**/*
|
||||
test_root/log/**/*.log
|
||||
*.log
|
||||
overwrite: true
|
||||
|
||||
4
.github/workflows/semgrep.yml
vendored
4
.github/workflows/semgrep.yml
vendored
@@ -17,9 +17,9 @@ jobs:
|
||||
runs-on: "${{ matrix.os }}"
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ "ubuntu-20.04" ]
|
||||
os: ["ubuntu-20.04"]
|
||||
python-version:
|
||||
- '3.11'
|
||||
- "3.11"
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
2
.github/workflows/shellcheck.yml
vendored
2
.github/workflows/shellcheck.yml
vendored
@@ -9,7 +9,7 @@ on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- master
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
122
.github/workflows/static-assets-check.yml
vendored
122
.github/workflows/static-assets-check.yml
vendored
@@ -12,11 +12,11 @@ jobs:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ ubuntu-20.04 ]
|
||||
os: [ubuntu-20.04]
|
||||
python-version:
|
||||
- '3.11'
|
||||
node-version: [ 18 ]
|
||||
npm-version: [ 10.5.x ]
|
||||
- "3.11"
|
||||
node-version: [18]
|
||||
npm-version: [10.5.x]
|
||||
mongo-version:
|
||||
- "7.0"
|
||||
|
||||
@@ -34,73 +34,73 @@ jobs:
|
||||
--health-retries 3
|
||||
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
- name: Setup Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install system Packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libxmlsec1-dev pkg-config
|
||||
- name: Install system Packages
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install libxmlsec1-dev pkg-config
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@${{ matrix.npm-version }}
|
||||
- name: Setup npm
|
||||
run: npm i -g npm@${{ matrix.npm-version }}
|
||||
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
- name: Get pip cache dir
|
||||
id: pip-cache-dir
|
||||
run: |
|
||||
echo "::set-output name=dir::$(pip cache dir)"
|
||||
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
- name: Cache pip dependencies
|
||||
id: cache-dependencies
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ${{ steps.pip-cache-dir.outputs.dir }}
|
||||
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
|
||||
restore-keys: ${{ runner.os }}-pip-
|
||||
|
||||
- name: Install Limited Python Deps for Build
|
||||
run: |
|
||||
pip install -r requirements/edx/assets.txt
|
||||
- name: Install Limited Python Deps for Build
|
||||
run: |
|
||||
pip install -r requirements/edx/assets.txt
|
||||
|
||||
- name: Initiate Mongo DB Service
|
||||
run: sudo systemctl start mongod
|
||||
- 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: Add node_modules bin to $Path
|
||||
run: echo $GITHUB_WORKSPACE/node_modules/.bin >> $GITHUB_PATH
|
||||
|
||||
- name: Check Dev Assets Build
|
||||
env:
|
||||
COMPREHENSIVE_THEMES_DIR: ./themes
|
||||
run: |
|
||||
npm clean-install --dev
|
||||
npm run build-dev
|
||||
- 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: 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: 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: |
|
||||
./manage.py lms collectstatic --noinput
|
||||
./manage.py cms collectstatic --noinput
|
||||
- name: Check Assets Collection
|
||||
env:
|
||||
LMS_CFG: lms/envs/minimal.yml
|
||||
CMS_CFG: lms/envs/minimal.yml
|
||||
DJANGO_SETTINGS_MODULE: lms.envs.production
|
||||
run: |
|
||||
./manage.py lms collectstatic --noinput
|
||||
./manage.py cms collectstatic --noinput
|
||||
|
||||
6
.github/workflows/unit-tests.yml
vendored
6
.github/workflows/unit-tests.yml
vendored
@@ -133,7 +133,7 @@ jobs:
|
||||
success:
|
||||
name: Unit tests successful
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ run-tests ]
|
||||
needs: [run-tests]
|
||||
steps:
|
||||
- name: Decide whether the needed jobs succeeded or failed
|
||||
# uses: re-actors/alls-green@v1.2.1
|
||||
@@ -143,7 +143,7 @@ jobs:
|
||||
|
||||
compile-warnings-report:
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ run-tests ]
|
||||
needs: [run-tests]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: collect pytest warnings files
|
||||
@@ -172,7 +172,7 @@ jobs:
|
||||
coverage:
|
||||
if: (github.repository == 'edx/edx-platform-private') || (github.repository == 'openedx/edx-platform' && (startsWith(github.base_ref, 'open-release') == false))
|
||||
runs-on: ubuntu-20.04
|
||||
needs: [ run-tests ]
|
||||
needs: [run-tests]
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- '3.12'
|
||||
- "3.12"
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
||||
@@ -13,7 +13,7 @@ jobs:
|
||||
strategy:
|
||||
matrix:
|
||||
python-version:
|
||||
- '3.12'
|
||||
- "3.12"
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
|
||||
18
.github/workflows/update-geolite-database.yml
vendored
18
.github/workflows/update-geolite-database.yml
vendored
@@ -6,18 +6,18 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Target branch against which to create PR'
|
||||
description: "Target branch against which to create PR"
|
||||
required: false
|
||||
default: 'master'
|
||||
default: "master"
|
||||
|
||||
env:
|
||||
MAXMIND_URL: 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz'
|
||||
MAXMIND_SHA256_URL: 'https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz.sha256'
|
||||
TAR_FILE_NAME: 'GeoLite2-Country.tar.gz'
|
||||
TAR_SHA256_FILE_NAME: 'GeoLite2-Country.tar.gz.sha256'
|
||||
TAR_UNZIPPED_ROOT_PATTERN: 'GeoLite2-Country_*'
|
||||
DB_FILE: 'GeoLite2-Country.mmdb'
|
||||
DB_DESTINATION_PATH: 'common/static/data/geoip'
|
||||
MAXMIND_URL: "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz"
|
||||
MAXMIND_SHA256_URL: "https://download.maxmind.com/app/geoip_download?edition_id=GeoLite2-Country&license_key=${{ secrets.MAXMIND_LICENSE_KEY }}&suffix=tar.gz.sha256"
|
||||
TAR_FILE_NAME: "GeoLite2-Country.tar.gz"
|
||||
TAR_SHA256_FILE_NAME: "GeoLite2-Country.tar.gz.sha256"
|
||||
TAR_UNZIPPED_ROOT_PATTERN: "GeoLite2-Country_*"
|
||||
DB_FILE: "GeoLite2-Country.mmdb"
|
||||
DB_DESTINATION_PATH: "common/static/data/geoip"
|
||||
|
||||
jobs:
|
||||
download-and-replace:
|
||||
|
||||
@@ -4,22 +4,22 @@ on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Target branch to create requirements PR against'
|
||||
description: "Target branch to create requirements PR against"
|
||||
required: true
|
||||
default: 'master'
|
||||
default: "master"
|
||||
type: string
|
||||
package:
|
||||
description: 'Name of package to upgrade'
|
||||
description: "Name of package to upgrade"
|
||||
required: true
|
||||
type: string
|
||||
version:
|
||||
description: 'Version number to upgrade to in constraints.txt (only needed if pinned)'
|
||||
default: ''
|
||||
description: "Version number to upgrade to in constraints.txt (only needed if pinned)"
|
||||
default: ""
|
||||
type: string
|
||||
change_desc:
|
||||
description: |
|
||||
Description of change, for commit message and PR. (What does the new version add or fix?)
|
||||
default: ''
|
||||
default: ""
|
||||
type: string
|
||||
|
||||
defaults:
|
||||
|
||||
@@ -2,26 +2,25 @@ name: Upgrade Requirements
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "0 2 * * 2"
|
||||
- cron: "0 2 * * 2"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Target branch to create requirements PR against'
|
||||
required: true
|
||||
default: 'master'
|
||||
inputs:
|
||||
branch:
|
||||
description: "Target branch to create requirements PR against"
|
||||
required: true
|
||||
default: "master"
|
||||
jobs:
|
||||
call-upgrade-python-requirements-workflow:
|
||||
# Don't run the weekly upgrade job on forks -- it will send a weekly failure email.
|
||||
if: github.repository == 'openedx/edx-platform' || github.event_name != 'schedule'
|
||||
uses: openedx/.github/.github/workflows/upgrade-python-requirements.yml@master
|
||||
with:
|
||||
branch: ${{ github.event.inputs.branch }}
|
||||
team_reviewers: "arbi-bom"
|
||||
email_address: arbi-bom@edx.org
|
||||
send_success_notification: false
|
||||
branch: ${{ github.event.inputs.branch }}
|
||||
team_reviewers: "arbi-bom"
|
||||
email_address: arbi-bom@edx.org
|
||||
send_success_notification: false
|
||||
secrets:
|
||||
requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
|
||||
requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
|
||||
edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }}
|
||||
edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }}
|
||||
|
||||
requirements_bot_github_token: ${{ secrets.REQUIREMENTS_BOT_GITHUB_TOKEN }}
|
||||
requirements_bot_github_email: ${{ secrets.REQUIREMENTS_BOT_GITHUB_EMAIL }}
|
||||
edx_smtp_username: ${{ secrets.EDX_SMTP_USERNAME }}
|
||||
edx_smtp_password: ${{ secrets.EDX_SMTP_PASSWORD }}
|
||||
|
||||
19
.github/workflows/verify-dunder-init.yml
vendored
19
.github/workflows/verify-dunder-init.yml
vendored
@@ -6,21 +6,18 @@ on:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
|
||||
verify_dunder_init:
|
||||
|
||||
name: Verify __init__.py Files
|
||||
runs-on: ubuntu-20.04
|
||||
|
||||
steps:
|
||||
- name: Check out branch
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check out branch
|
||||
uses: actions/checkout@v4
|
||||
- name: Ensure git is installed
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install git
|
||||
|
||||
- name: Ensure git is installed
|
||||
run: |
|
||||
sudo apt-get update && sudo apt-get install git
|
||||
|
||||
- name: Verify __init__.py files exist
|
||||
run: |
|
||||
scripts/verify-dunder-init.sh
|
||||
- name: Verify __init__.py files exist
|
||||
run: |
|
||||
scripts/verify-dunder-init.sh
|
||||
|
||||
Reference in New Issue
Block a user