[pre-commit.ci] pre-commit autoupdate #556
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
workflow_dispatch: | |
name: Tests | |
jobs: | |
pytest: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [macos-latest, ubuntu-latest, windows-latest] | |
pyversion: ['3.9', '3.10', '3.11', '3.12'] | |
runs-on: ${{ matrix.os }} | |
env: | |
QT_QPA_PLATFORM: offscreen | |
MANIM_SLIDES_VERBOSITY: error | |
PYTHONFAULTHANDLER: 1 | |
DISPLAY: :99 | |
GITHUB_WORKFLOWS: 1 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Rye | |
if: matrix.os != 'windows-latest' | |
env: | |
RYE_TOOLCHAIN_VERSION: ${{ matrix.pyversion}} | |
RYE_INSTALL_OPTION: --yes | |
run: | | |
curl -sSf https://rye.astral.sh/get | bash | |
echo "$HOME/.rye/shims" >> $GITHUB_PATH | |
# Stolen from https://github.com/bluss/pyproject-local-kernel/blob/2b641290694adc998fb6bceea58d3737523a68b7/.github/workflows/ci.yaml | |
- name: Install Rye (Windows) | |
if: matrix.os == 'windows-latest' | |
shell: bash | |
run: | | |
C:/msys64/usr/bin/wget.exe -q 'https://github.com/astral-sh/rye/releases/latest/download/rye-x86_64-windows.exe' -O rye-x86_64-windows.exe | |
./rye-x86_64-windows.exe self install --toolchain-version ${{ matrix.pyversion }} --modify-path -y | |
echo "$HOME\\.rye\\shims" >> $GITHUB_PATH | |
- name: Configure Rye | |
shell: bash | |
run: | | |
rye config --set-bool behavior.use-uv=true | |
rye pin ${{ matrix.pyversion }} | |
- name: Install manim dependencies on MacOS | |
if: matrix.os == 'macos-latest' | |
run: brew install ffmpeg py3cairo | |
- name: Install manim dependencies on Ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcairo2-dev libpango1.0-dev ffmpeg freeglut3-dev | |
sudo apt-get install xvfb | |
nohup Xvfb $DISPLAY & | |
- name: Install Windows dependencies | |
if: matrix.os == 'windows-latest' | |
run: choco install ffmpeg | |
- name: Install Mesa | |
if: matrix.os == 'windows-latest' | |
uses: ssciwr/setup-mesa-dist-win@v2 | |
- name: Install Manim Slides | |
shell: bash | |
run: rye sync | |
- name: Run pytest | |
shell: bash | |
if: matrix.os != 'ubuntu-latest' || matrix.pyversion != '3.11' | |
run: rye run pytest | |
- name: Run pytest and coverage | |
if: matrix.os == 'ubuntu-latest' && matrix.pyversion == '3.11' | |
run: rye run pytest --cov-report xml --cov=manim_slides tests/ | |
- name: Upload to codecov.io | |
if: matrix.os == 'ubuntu-latest' && matrix.pyversion == '3.11' | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
fail_ci_if_error: true | |
markdown-link-check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Check links | |
uses: gaurav-nelson/github-action-markdown-link-check@v1 | |
with: | |
use-quiet-mode: yes | |
use-verbose-mode: yes | |
config-file: .mdlc.json |