Skip to content

Merge pull request #207 from emptymalei/patch-1 #667

Merge pull request #207 from emptymalei/patch-1

Merge pull request #207 from emptymalei/patch-1 #667

Workflow file for this run

name: run testing suite
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
max-parallel: 15
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11"]
torch-version: ["1.8.1", "1.9.1", "1.10.0", "1.11.0", "1.12.0", "1.13.1", "2.0.0"]
exclude:
# python >= 3.10 does not support pytorch < 1.11.0
- torch-version: "1.8.1"
python-version: "3.10"
- torch-version: "1.9.1"
python-version: "3.10"
- torch-version: "1.10.0"
python-version: "3.10"
# python >= 3.11 does not support pytorch < 1.13.0
- torch-version: "1.8.1"
python-version: "3.11"
- torch-version: "1.9.1"
python-version: "3.11"
- torch-version: "1.10.0"
python-version: "3.11"
- torch-version: "1.11.0"
python-version: "3.11"
- torch-version: "1.12.0"
python-version: "3.11"
- torch-version: "1.13.1"
python-version: "3.11"
defaults:
run:
shell: bash
steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-pip-wheels
uses: actions/cache@v3
with:
path: ~/.cache
key: venv-${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.torch-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies # hack for 🐛: don't let poetry try installing Torch https://github.com/pytorch/pytorch/issues/88049
run: |
pip install pytest pytest-cov papermill poethepoet>=0.10.0
pip install torch==${{ matrix.torch-version }} pytorch-lightning scikit-learn torchsde torchcde>=0.2.3 scipy matplotlib ipykernel ipywidgets
poetry install --only-root
poetry run pip install setuptools
- name: List dependencies
run: |
pip list
- name: Run pytest checks
run: |
source $VENV
poetry run coverage run --source=torchdyn -m pytest
- name: Report coverage
uses: codecov/[email protected]