Skip to content

Merge pull request #327 from fourMs/copilot/align-toolbox-with-modern-ml #63

Merge pull request #327 from fourMs/copilot/align-toolbox-with-modern-ml

Merge pull request #327 from fourMs/copilot/align-toolbox-with-modern-ml #63

Workflow file for this run

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
name: "Python ${{ matrix.python-version }} on ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
permissions:
contents: read
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.10", "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 system dependencies on macOS
if: runner.os == 'macOS'
run: brew install ffmpeg
- name: Install system dependencies on Ubuntu
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y ffmpeg
- name: Install FFmpeg on Windows
if: runner.os == 'Windows'
uses: FedericoCarboni/setup-ffmpeg@v3
id: setup-ffmpeg
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install package and dependencies
run: pip install -e ".[dev]"
- name: Test import
run: python -c "import musicalgestures; print('Import OK')"
- name: Run tests
run: pytest tests/ --tb=short -q
lint:
name: "Lint & type-check"
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install lint dependencies
run: pip install ruff mypy
- name: Ruff lint
run: ruff check musicalgestures/ --ignore E501
- name: Ruff format check
run: ruff format --check musicalgestures/ || true
- name: Mypy type check
run: mypy musicalgestures/ --ignore-missing-imports --no-error-summary || true