Skip to content

Commit

Permalink
chore: cleanup
Browse files Browse the repository at this point in the history
- rst heading definitions
- indirect hyperlinks and code-blocks added for better readability
- MarkDown warnings resolved
- Yaml style issues fixed
  • Loading branch information
CodeWithEmad committed Jun 3, 2024
1 parent 0c44a78 commit 6c5b980
Show file tree
Hide file tree
Showing 25 changed files with 311 additions and 321 deletions.
4 changes: 2 additions & 2 deletions .github/actions/unit-tests/action.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
6 changes: 2 additions & 4 deletions .github/actions/verify-tests-count/action.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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: |
Expand Down
2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand All @@ -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.
1 change: 0 additions & 1 deletion .github/workflows/add-remove-label-on-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,3 @@ on:
jobs:
add_remove_labels:
uses: openedx/.github/.github/workflows/add-remove-label-on-comment.yml@master

2 changes: 1 addition & 1 deletion .github/workflows/check-consistent-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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' }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-for-tutorial-prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:
pull_request:
types: [opened]
paths:
- 'lms/templates/dashboard.html'
- "lms/templates/dashboard.html"

jobs:
# Provide helpful bot comment
Expand All @@ -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 changes: 2 additions & 2 deletions .github/workflows/ci-static-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/compile-python-requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 changes: 57 additions & 58 deletions .github/workflows/js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 [email protected]

- name: Setup npm
run: npm i -g [email protected]
- 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 changes: 1 addition & 2 deletions .github/workflows/lint-imports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- master

jobs:

lint-imports:
name: Lint Python Imports
runs-on: ubuntu-20.04
Expand All @@ -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
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 @@ -5,7 +5,7 @@ name: Lockfile Version check
on:
push:
branches:
- master
- master
pull_request:

jobs:
Expand Down
Loading

0 comments on commit 6c5b980

Please sign in to comment.