Skip to content

Use NodeJS Filesystem API to create directories #193

Use NodeJS Filesystem API to create directories

Use NodeJS Filesystem API to create directories #193

Workflow file for this run

name: Testing
on:
push:
branches:
- main
# Trigger each time HEAD branch is updated in a pull request
# see https://github.com/orgs/community/discussions/26366
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
jobs:
test:
# Adapted from:
# https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions
name: Integration tests
environment: testing
strategy:
fail-fast: false
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 22.x # LTS until Oct 2025
- run: npm install
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.13' # end of support: 2029-10
# hopefully, this can be cached in the future
# see: https://github.com/actions/setup-python/issues/991
- name: Install Mesa (Linux)
if: runner.os == 'Linux'
run: |
# Install OpenGL Mesa Utils
# https://idroot.us/install-mesa-drivers-ubuntu-24-04/
sudo add-apt-repository ppa:kisak/kisak-mesa
sudo apt-get update
sudo apt-get install mesa-utils -y
# Install Pango
sudo apt-get install libpango1.0-dev -y
# Work around 'NoneType' object has no attribute 'glGetError'
# https://github.com/MPI-IS/mesh/issues/23#issuecomment-607784234
sudo apt-get install python3-opengl
# Install copy-paste mechanism to avoid ClipboardUnavailable errors
# (python pyperclip makes use of xclip on Linux)
sudo apt-get install xclip -y
- name: Install Mesa (MinGW, Windows)
if: runner.os == 'Windows'
run: |
# Install OpenGL pre-built Mesa binaries from mesa-dist-win
Invoke-WebRequest -Uri https://github.com/pal1000/mesa-dist-win/releases/download/24.3.2/mesa3d-24.3.2-release-mingw.7z -OutFile mesa3d.7z
# Extract (on purpose no space between -o and mesa3d)
7z x mesa3d.7z -omesa3d
# Install system-wide (option 1: core desktop OpenGL drivers)
.\mesa3d\systemwidedeploy.cmd 1
- name: Test OpenGL
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
xvfb-run -a glxinfo | grep "OpenGL version"
elif [ "$RUNNER_OS" == "macOS" ]; then
echo "We don't know a way to install the glxinfo command on macOS,"
echo "so we can't check the OpenGL version :("
elif [ "$RUNNER_OS" == "Windows" ]; then
# Download wglinfo (analogous to glxinfo)
curl -L -O https://github.com/gkv311/wglinfo/releases/latest/download/wglinfo64.exe
chmod +x wglinfo64.exe
./wglinfo64.exe | grep "OpenGL version"
else
echo "Unknown OS"
exit 1
fi
shell: bash
- name: Install Manim (pretest)
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
xvfb-run -a npm run pretest
else
npm run pretest
fi
shell: bash
- name: Run tests
run: |
if [ "$RUNNER_OS" == "Linux" ]; then
# Start an X virtual framebuffer (Xvfb) server, which emulates a
# display server without requiring a physical display.
xvfb-run -a npm run testInGithubActions
else
npm run testInGithubActions
fi
shell: bash