Fix CI: drop Python 3.9, patch DID-python subpackage discovery #2
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: | |
| 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 VH-Lab dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| # DID-python's pyproject.toml uses packages=["did"] which misses | |
| # subpackages like did.implementations. Patch it to use find: before installing. | |
| git clone https://github.com/VH-Lab/DID-python.git /tmp/DID-python | |
| cd /tmp/DID-python | |
| sed -i 's/packages = \["did"\]/packages = {find = {where = ["src"]}}/' pyproject.toml | |
| cd - | |
| pip install -e /tmp/DID-python | |
| # vhlab-toolbox-python has no pyproject.toml; add to PYTHONPATH | |
| git clone https://github.com/VH-Lab/vhlab-toolbox-python.git /tmp/vhlab-toolbox-python | |
| - name: Install NDI-python | |
| run: | | |
| pip install -e ".[dev]" | |
| pip install scipy | |
| - name: Run tests | |
| env: | |
| PYTHONPATH: /tmp/vhlab-toolbox-python | |
| run: | | |
| pytest tests/ -v --tb=short |