Add MATLAB to Python porting guide with strict mirroring rules #52
Workflow file for this run
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] | |
| pull_request: | |
| branches: [main] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python 3.12 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.12" | |
| - name: Install linting tools | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install ruff black | |
| - name: Check formatting with black | |
| run: black --check src/ tests/ | |
| - name: Lint with ruff | |
| run: ruff check src/ tests/ | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| 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 with ndi_install.py | |
| run: | | |
| python -m pip install --upgrade pip | |
| python ndi_install.py --dev --no-validate --verbose | |
| - name: Validate installation | |
| run: python -m ndi check | |
| - name: Run tests with coverage | |
| run: | | |
| # Use sys.monitoring (PEP 669) on Python 3.12+ for faster coverage. | |
| # CTracer (sys.settrace) is catastrophically slow on 3.12 when | |
| # importing large packages like openminds (~6 min vs ~2 sec). | |
| COVERAGE_CORE=$(python -c "import sys; print('sysmon' if sys.version_info >= (3,12) else 'ctrace')") | |
| export COVERAGE_CORE | |
| pytest tests/ -v --tb=short --cov=src/ndi --cov-report=term-missing |