mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-25 00:51:20 +00:00
test: parallelize test suite with pytest-xdist
~2min sequential runs were painful. Added pytest-xdist and -n auto to run across all available cores. Tests already isolate state via tmp_path fixtures so no changes needed to test code. Local: 2677 passed in ~30s. CI gets 4 vCPUs on ubuntu-latest.
This commit is contained in:
parent
172a38c344
commit
0d96f1991c
2 changed files with 3 additions and 3 deletions
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
|
|
@ -34,7 +34,7 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
source .venv/bin/activate
|
source .venv/bin/activate
|
||||||
python -m pytest tests/ -q --ignore=tests/integration --tb=short
|
python -m pytest tests/ -q --ignore=tests/integration --tb=short -n auto
|
||||||
env:
|
env:
|
||||||
# Ensure tests don't accidentally call real APIs
|
# Ensure tests don't accidentally call real APIs
|
||||||
OPENROUTER_API_KEY: ""
|
OPENROUTER_API_KEY: ""
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ dependencies = [
|
||||||
[project.optional-dependencies]
|
[project.optional-dependencies]
|
||||||
modal = ["swe-rex[modal]>=1.4.0"]
|
modal = ["swe-rex[modal]>=1.4.0"]
|
||||||
daytona = ["daytona>=0.148.0"]
|
daytona = ["daytona>=0.148.0"]
|
||||||
dev = ["pytest", "pytest-asyncio", "mcp>=1.2.0"]
|
dev = ["pytest", "pytest-asyncio", "pytest-xdist", "mcp>=1.2.0"]
|
||||||
messaging = ["python-telegram-bot>=20.0", "discord.py>=2.0", "aiohttp>=3.9.0", "slack-bolt>=1.18.0", "slack-sdk>=3.27.0"]
|
messaging = ["python-telegram-bot>=20.0", "discord.py>=2.0", "aiohttp>=3.9.0", "slack-bolt>=1.18.0", "slack-sdk>=3.27.0"]
|
||||||
cron = ["croniter"]
|
cron = ["croniter"]
|
||||||
slack = ["slack-bolt>=1.18.0", "slack-sdk>=3.27.0"]
|
slack = ["slack-bolt>=1.18.0", "slack-sdk>=3.27.0"]
|
||||||
|
|
@ -81,4 +81,4 @@ testpaths = ["tests"]
|
||||||
markers = [
|
markers = [
|
||||||
"integration: marks tests requiring external services (API keys, Modal, etc.)",
|
"integration: marks tests requiring external services (API keys, Modal, etc.)",
|
||||||
]
|
]
|
||||||
addopts = "-m 'not integration'"
|
addopts = "-m 'not integration' -n auto"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue