feat(lib): first working prototype #2
Workflow file for this run
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.8', '3.9', '3.10', '3.11', '3.12'] | |
runs-on: ${{ matrix.os }} | |
env: | |
QT_QPA_PLATFORM: offscreen | |
DISPLAY: :99 | |
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 Ubuntu | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
sudo apt-get update | |
sudo apt-get install xvfb | |
nohup Xvfb $DISPLAY & | |
- name: Install Mesa | |
if: matrix.os == 'windows-latest' | |
uses: ssciwr/setup-mesa-dist-win@v2 | |
- name: Install local package | |
shell: bash | |
run: rye sync | |
- name: Run pytest | |
shell: bash | |
run: rye run pytest |