feat: Add multi-OS testing and update dependencies #20
  
    
      This file contains hidden or 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
    
  
  
    
  | name: CI | |
| on: | |
| push: | |
| branches: [main, tests, release] | |
| pull_request: | |
| branches: [main, release] | |
| workflow_dispatch: | |
| jobs: | |
| test-ubuntu: | |
| name: Test on Ubuntu (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install just | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to $HOME/.local/bin | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install ffmpeg | |
| run: | | |
| sudo apt update && sudo apt install -y ffmpeg | |
| - name: Install dependencies | |
| run: | | |
| uv sync --frozen | |
| - name: Lint | |
| run: | | |
| just lint | |
| - name: Type check | |
| run: | | |
| just typecheck | |
| - name: Test | |
| run: | | |
| just test | |
| test-multi-os: | |
| name: Test on ${{ matrix.os }} (Python ${{ matrix.python-version }}) | |
| if: github.ref == 'refs/heads/release' | |
| strategy: | |
| fail-fast: false # Don't cancel all jobs if one OS fails | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| os: [macos-latest, windows-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install just | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://just.systems/install.sh | bash -s -- --to $HOME/.local/bin | |
| echo "$HOME/.local/bin" >> $GITHUB_PATH | |
| shell: bash # Ensure bash is used even on Windows | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| shell: bash # Ensure bash is used even on Windows | |
| - name: Install ffmpeg (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| brew install ffmpeg | |
| - name: Install ffmpeg (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| choco install ffmpeg | |
| - name: Install dependencies | |
| run: | | |
| uv sync --frozen | |
| # Linting/Type checking skipped on multi-os, covered by ubuntu job | |
| - name: Test | |
| run: | | |
| just test |