Skip to content

Commit 9b1a89b

Browse files
authored
chore: skip Gemini tests in local runs (#2181)
1 parent 78f08f8 commit 9b1a89b

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

docs/graph.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ stateDiagram-v2
352352
Feedback --> [*]
353353
```
354354

355-
```python {title="genai_email_feedback.py" py="3.10"}
355+
```python {title="genai_email_feedback.py" py="3.10" test="ci_only"}
356356
from __future__ import annotations as _annotations
357357

358358
from dataclasses import dataclass, field

docs/models/google.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ To use Vertex AI, you may need to set up [application default credentials](https
5858

5959
If you have the [`gcloud` CLI](https://cloud.google.com/sdk/gcloud) installed and configured, you can use:
6060

61-
```python
61+
```python {test="ci_only"}
6262
from pydantic_ai import Agent
6363
from pydantic_ai.models.google import GoogleModel
6464
from pydantic_ai.providers.google import GoogleProvider

tests/test_examples.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,9 @@ def print(self, *args: Any, **kwargs: Any) -> None:
205205
eval_example.lint_ruff(example)
206206

207207
if opt_test.startswith('skip'):
208-
print(opt_test[4:].lstrip(' -') or 'running code skipped')
208+
pytest.skip(opt_test[4:].lstrip(' -') or 'running code skipped')
209+
elif opt_test.startswith('ci_only') and os.environ.get('GITHUB_ACTIONS', '').lower() != 'true':
210+
pytest.skip(opt_test[7:].lstrip(' -') or 'running code skipped in local tests') # pragma: no cover
209211
else:
210212
test_globals: dict[str, str] = {'__name__': dunder_name}
211213

0 commit comments

Comments
 (0)