Skip to content

Commit b15c48c

Browse files
author
Raimondas Galvelis
committed
Fix the CI
1 parent f112ee6 commit b15c48c

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

.github/workflows/CI.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ jobs:
2828
key: ${{ runner.os }}-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }}
2929
env:
3030
# Increase this value to reset cache if environment.yml has not changed
31-
CACHE_NUMBER: 0
31+
CACHE_NUMBER: 1
3232

3333
- name: Create a conda environment
3434
uses: conda-incubator/setup-miniconda@v2
@@ -51,4 +51,4 @@ jobs:
5151
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
5252
5353
- name: Run tests
54-
run: pytest
54+
run: pytest -v

tests/test_cfconv.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pytest
12
from pytest import mark
23
import torch as pt
34
from torchmdnet.models.torchmd_gn import CFConv as RefCFConv
@@ -11,6 +12,9 @@
1112
@mark.parametrize('cutoff_upper', [5.0, 10.0])
1213
def test_cfconv(device, num_atoms, num_filters, num_rbfs, cutoff_upper):
1314

15+
if not pt.cuda.is_available() and device == 'cuda':
16+
pytest.skip('No GPU')
17+
1418
device = pt.device(device)
1519

1620
# Generate random inputs

tests/test_optimize.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import pytest
12
from pytest import mark
23
import torch as pt
34
from torchmdnet.models.model import create_model
@@ -7,6 +8,9 @@
78
@mark.parametrize('num_atoms', [10, 100])
89
def test_gn(device, num_atoms):
910

11+
if not pt.cuda.is_available() and device == 'cuda':
12+
pytest.skip('No GPU')
13+
1014
device = pt.device(device)
1115

1216
# Generate random inputs

0 commit comments

Comments
 (0)