Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .github/actions/unit-tests/action.yml

This file was deleted.

49 changes: 0 additions & 49 deletions .github/actions/verify-tests-count/action.yml

This file was deleted.

36 changes: 21 additions & 15 deletions .github/workflows/check-consistent-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ name: Consistent Python dependencies

on:
pull_request:
merge_group:

defaults:
run:
Expand All @@ -15,32 +16,37 @@ defaults:
jobs:
check-requirements:
name: Compile requirements
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
# Always checkout the code because we don't always have a PR url.
- uses: actions/checkout@v6

# Only run remaining steps if there are changes to requirements/**
# We do this instead of using path based short-circuiting.
# see https://stackoverflow.com/questions/77996177/how-can-i-handle-a-required-check-that-isnt-always-triggered
# for some more details.
- name: "Decide whether to short-circuit"
env:
GH_TOKEN: "${{ github.token }}"
PR_URL: "${{ github.event.pull_request.html_url }}"
run: |
paths=$(gh pr diff "$PR_URL" --name-only)
echo $'Paths touched in PR:\n'"$paths"
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
BASE_SHA="${{ github.event.pull_request.base.sha }}"
else
BASE_SHA="${{ github.event.merge_group.base_sha }}"
fi

# Fetch the base sha so we can compare to it. It's not checked out by
# default.
git fetch origin "$BASE_SHA"

# The ^"? is because git may quote weird file paths
matched="$(echo "$paths" | grep -P '^"?((requirements/)|(scripts/.*?/requirements/))' || true)"
echo $'Relevant paths:\n'"$matched"
if [[ -n "$matched" ]]; then
echo "RELEVANT=true" >> "$GITHUB_ENV"
if git diff --name-only "$BASE_SHA" | grep -P '^"?((requirements/)|(scripts/.*?/requirements/))'; then
echo "RELEVANT=true" >> "$GITHUB_ENV"
fi

- uses: actions/checkout@v3
if: ${{ env.RELEVANT == 'true' }}

- uses: actions/setup-python@v4
- uses: actions/setup-python@v6
if: ${{ env.RELEVANT == 'true' }}
with:
python-version: '3.8'
python-version: '3.11'

- name: "Recompile requirements"
if: ${{ env.RELEVANT == 'true' }}
Expand Down
19 changes: 11 additions & 8 deletions .github/workflows/ci-static-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,36 +1,39 @@
name: Static analysis

on: pull_request
on:
pull_request:
merge_group:

jobs:
tests:
name: Static analysis
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: ['3.8', '3.11']
os: ['ubuntu-20.04']
python-version:
- "3.11"
os: ["ubuntu-24.04"]

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install system requirements
run: sudo apt update && sudo apt install -y libxmlsec1-dev

- name: Install pip
run: python -m pip install -r requirements/pip.txt
run: make pre-requirements

- name: Get pip cache dir
id: pip-cache-dir
run: echo "::set-output name=dir::$(pip cache dir)"
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache pip dependencies
id: cache-dependencies
uses: actions/cache@v3
uses: actions/cache@v5
with:
path: ${{ steps.pip-cache-dir.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements/edx/development.txt') }}
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/commitlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@
name: Lint Commit Messages

on:
- pull_request
pull_request:
merge_group:

jobs:
commitlint:
Expand Down
14 changes: 7 additions & 7 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 All @@ -15,18 +15,18 @@ defaults:

jobs:
recompile-python-dependencies:
runs-on: ubuntu-20.04
runs-on: ubuntu-latest

steps:
- name: Check out target branch
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
ref: "${{ inputs.branch }}"

- name: Set up Python environment
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "3.8"
python-version: "3.11"

- name: Run make compile-requirements
env:
Expand All @@ -44,7 +44,7 @@ jobs:

- name: Make a PR
id: make-pr
uses: peter-evans/create-pull-request@v5
uses: peter-evans/create-pull-request@v8
with:
branch: "${{ github.triggering_actor }}/compile-python-deps"
branch-suffix: short-commit-hash
Expand Down
116 changes: 59 additions & 57 deletions .github/workflows/js-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: Javascript tests

on:
pull_request:
merge_group:
push:
branches:
- master
Expand All @@ -12,72 +13,73 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-20.04 ]
node-version: [ 18 ]
python-version: [ '3.8', '3.11' ]
os: [ubuntu-latest]
node-version: [18]
python-version:
- "3.11"

steps:
- uses: actions/checkout@v6
- name: Fetch master to compare coverage
run: git fetch --depth=1 origin master

- uses: actions/checkout@v2
- name: Fetch master to compare coverage
run: git fetch --depth=1 origin master
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'

- 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@v6
with:
python-version: ${{ matrix.python-version }}

- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Get pip cache dir
id: pip-cache-dir
run: |
echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- 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@v5
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@v3
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
- 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@v3
with:
name: Build-Artifacts
path: |
reports/**/*
test_root/log/*.png
test_root/log/*.log
**/TEST-*.xml
- name: Save Job Artifacts
uses: actions/upload-artifact@v6
with:
name: Build-Artifacts
path: |
reports/**/*
test_root/log/*.png
test_root/log/*.log
**/TEST-*.xml
overwrite: true
Loading
Loading