Install all libraries in the Test CI job #1316
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: Tests | |
| on: [push, pull_request] | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - numpy-version: '1.22' | |
| python-version: '3.10' | |
| - numpy-version: '1.26' | |
| python-version: '3.10' | |
| - numpy-version: '1.26' | |
| python-version: '3.12' | |
| - numpy-version: 'latest' | |
| python-version: '3.10' | |
| - numpy-version: 'latest' | |
| python-version: '3.13' | |
| - numpy-version: 'dev' | |
| python-version: '3.11' | |
| - numpy-version: 'dev' | |
| python-version: '3.13' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install pytest | |
| # Don't `pip install .[dev]` as it would pull in the whole torch cuda stack | |
| python -m pip install array-api-strict dask[array] jax[cpu] sparse ndonnx | |
| python -m pip install torch --index-url https://download.pytorch.org/whl/cpu | |
| if [ "${{ matrix.numpy-version }}" == "dev" ]; then | |
| python -m pip install numpy --pre --extra-index-url https://pypi.anaconda.org/scientific-python-nightly-wheels/simple | |
| elif [ "${{ matrix.numpy-version }}" == "1.22" ]; then | |
| python -m pip install 'numpy==1.22.*' | |
| elif [ "${{ matrix.numpy-version }}" == "1.26" ]; then | |
| python -m pip install 'numpy==1.26.*' | |
| else | |
| python -m pip install numpy | |
| fi | |
| - name: Dump pip environment | |
| run: pip freeze | |
| - name: Test it installs | |
| run: python -m pip install . | |
| - name: Run Tests | |
| run: pytest -v |