Fix CI: add openminds to CI deps, guard tests with importorskip #8
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 | |
| # Clone DID-python and its deps (its pyproject.toml has a packaging | |
| # bug that misses subpackages — we use PYTHONPATH instead of pip) | |
| git clone https://github.com/VH-Lab/DID-python.git /tmp/DID-python | |
| pip install numpy pandas portalocker networkx matplotlib | |
| # vhlab-toolbox-python has no pyproject.toml; use 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]" --no-deps | |
| pip install numpy networkx jsonschema requests pytest pytest-cov scipy openminds | |
| - name: Run tests | |
| env: | |
| PYTHONPATH: /tmp/DID-python/src:/tmp/vhlab-toolbox-python | |
| run: | | |
| pytest tests/ -v --tb=short |