Repository: mberr/torch-ppr (language: python)

Issue:
Fix torch.sparse.addmm use
Partially fixes #11


Discussion / hints:

Fix patch:
diff --git a/tox.ini b/tox.ini
index 0c45f39..983a0d5 100644
--- a/tox.ini
+++ b/tox.ini
@@ -23,7 +23,7 @@ envlist =
     docstr-coverage
     docs-test
     # the actual tests
-    py
+    py-torch-{1.10,1.11}
     # always keep coverage-report last
     # coverage-report
 
@@ -34,6 +34,11 @@ commands =
     coverage run -p -m pytest --durations=20 {posargs:tests}
     coverage combine
     coverage xml
+setenv = 
+    PIP_EXTRA_INDEX_URL=https://download.pytorch.org/whl/cpu
+deps =
+    torch-1.10: torch~=1.10.0
+    torch-1.11: torch~=1.11.0
 extras =
     # See the [options.extras_require] entry in setup.cfg for "tests"
     tests


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index d5bd02b..6185e44 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -51,11 +51,14 @@ jobs:
         run: tox -e docs-test
   tests:
     name: Tests
-    runs-on: ${{ matrix.os }}
+    runs-on: ubuntu-latest
     strategy:
       matrix:
-        os: [ ubuntu-latest ]
         python-version: [ "3.8", "3.9", "3.10" ]
+        torch-version: [ "torch-1.10", "torch-1.11" ]
+        exclude:
+          - python-version: "3.10"
+            torch-version: "torch-1.10"
     steps:
       - uses: actions/checkout@v2
       - name: Set up Python ${{ matrix.python-version }}
@@ -66,7 +69,7 @@ jobs:
         run: pip install tox
       - name: Test with pytest and generate coverage file
         run:
-          tox -e py
+          tox -e py-{${{ matrix.torch-version }}}
       - name: Upload coverage report to codecov
         uses: codecov/codecov-action@v1
         if: success()