Skip to content

Adds Problem XBlock extracting from edx-platform repo #5

Adds Problem XBlock extracting from edx-platform repo

Adds Problem XBlock extracting from edx-platform repo #5

name: JavaScript Tests
on:
push:
branches: [main]
pull_request:
branches:
- "**"
jobs:
javascript-tests:
name: Run JavaScript Tests
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20]
steps:
- name: Check out repository
uses: actions/checkout@v5
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v5
with:
node-version: ${{ matrix.node-version }}
cache: "npm"
- name: Install Firefox (DEB version) and XVFB
run: |
# Add Mozilla's PPA to get the native .deb package
sudo install -d -m 0755 /etc/apt/keyrings
wget -q https://packages.mozilla.org/pkgs/keys/mozilla-repo-key.asc -O- | sudo tee /etc/apt/keyrings/mozilla.asc > /dev/null
echo "deb [signed-by=/etc/apt/keyrings/mozilla.asc] https://packages.mozilla.org/Debian stable main" | sudo tee /etc/apt/sources.list.d/mozilla.list > /dev/null
# Prioritize the Mozilla PPA over Ubuntu's default
echo '
Package: *
Pin: origin packages.mozilla.org
Pin-Priority: 1000
' | sudo tee /etc/apt/preferences.d/mozilla
# Update and install Firefox and the virtual framebuffer
sudo apt-get update && sudo apt-get install -y firefox xvfb
- name: Install npm dependencies
run: npm ci
- name: Run tests
run: npm run test:ci