connor-jason commited on
Commit
f78888d
·
1 Parent(s): a612573
.github/workflows/run-tests.yml CHANGED
@@ -22,6 +22,8 @@ jobs:
22
 
23
  - name: Run test
24
  run: uv run pytest tests
 
 
25
 
26
  - name: Let me know this worked
27
  run: echo "yeah it did lol"
 
22
 
23
  - name: Run test
24
  run: uv run pytest tests
25
+ env:
26
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
27
 
28
  - name: Let me know this worked
29
  run: echo "yeah it did lol"
tests/test_models.py CHANGED
@@ -1,3 +1,5 @@
 
 
1
  from PIL import Image
2
  from local_model import query_local
3
  from remote_model import query_remote, client
@@ -11,6 +13,7 @@ def test_local_model():
11
  assert len(result) > 0
12
 
13
 
 
14
  def test_remote_model():
15
  img = Image.new('RGB', (100, 100), color='blue')
16
  result = query_remote(img, "test?", client)
 
1
+ import pytest
2
+ import os
3
  from PIL import Image
4
  from local_model import query_local
5
  from remote_model import query_remote, client
 
13
  assert len(result) > 0
14
 
15
 
16
+ @pytest.mark.skipif(os.getenv("HF_TOKEN") is None, reason="skipping remote model test no HF_TOKEN")
17
  def test_remote_model():
18
  img = Image.new('RGB', (100, 100), color='blue')
19
  result = query_remote(img, "test?", client)