Port MATLAB features: preferences, profiles, RHD series navigator, MATLAB BYOL #337
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 | |
| env: | |
| NDI_CLOUD_USERNAME: ${{ secrets.TEST_USER_2_USERNAME }} | |
| NDI_CLOUD_PASSWORD: ${{ secrets.TEST_USER_2_PASSWORD }} | |
| # The CI test account does not have a registered MATLAB | |
| # license, so the destructive BYOL tests (DELETE | |
| # /users/me/matlab-license) are allowed to run; they will | |
| # clean up after themselves. The license guard in | |
| # tests/_matlab_license_guard.py enforces this at module-import | |
| # time and refuses to run if this variable is unset. | |
| NDI_CLOUD_TEST_USER_HAS_MATLAB_LICENSE: "false" | |
| 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 |