README: Add a note about pynvml binding requirements. #148
This file contains 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: "Run Tests" | |
on: [push, pull_request, workflow_dispatch] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
unit-tests: | |
name: "Unit Tests" | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
include: | |
- os: ubuntu-20.04 | |
python-version: "3.6" | |
- os: ubuntu-latest | |
python-version: "3.7" | |
- os: ubuntu-latest | |
python-version: "3.8" | |
- os: ubuntu-latest | |
python-version: "3.9" | |
- os: ubuntu-latest | |
python-version: "3.10" | |
- os: ubuntu-latest | |
python-version: "3.11" | |
- os: ubuntu-latest | |
python-version: "3.11" | |
pynvml-version: 11.495.46 # legacy pynvml, see #143 | |
- os: ubuntu-latest | |
python-version: "3.12" | |
- os: windows-latest | |
python-version: "3.8" | |
- os: windows-latest | |
python-version: "3.9" | |
- os: windows-latest | |
python-version: "3.10" | |
- os: windows-latest | |
python-version: "3.11" | |
- os: windows-latest | |
python-version: "3.12" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Upgrade pip | |
run: | | |
python -m pip install -U pip | |
- name: Configure environments | |
run: | | |
python --version | |
- name: Install dependencies | |
run: | | |
pip install -e ".[test]" | |
if [ -n "${{ matrix.pynvml-version }}" ]; then | |
pip install nvidia-ml-py==${{ matrix.pynvml-version }} | |
fi | |
python -m gpustat --version | |
- name: Run tests | |
run: | | |
pytest --color=yes -v -s | |
env: | |
PYTHONIOENCODING: UTF-8 |