Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Codecov

on:
push:
branches:
- main
paths:
- 'agentstack/**/*.py'
pull_request:
branches:
- main
paths:
- 'agentstack/**/*.py'

jobs:
test:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.11

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox

- name: Run tests with tox
run: tox

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
flags: unittests
name: codecov-umbrella
fail_ci_if_error: true
8 changes: 4 additions & 4 deletions tests/test_agents_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ def tearDown(self):
def test_empty_file(self):
config = AgentConfig("agent_name")
assert config.name == "agent_name"
assert config.role is ""
assert config.goal is ""
assert config.backstory is ""
assert config.llm is ""
assert config.role == ""
assert config.goal == ""
assert config.backstory == ""
assert config.llm == ""

def test_read_minimal_yaml(self):
shutil.copy(BASE_PATH / "fixtures/agents_min.yaml", self.project_dir / AGENTS_FILENAME)
Expand Down
12 changes: 6 additions & 6 deletions tests/test_tasks_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ def tearDown(self):
def test_empty_file(self):
config = TaskConfig("task_name")
assert config.name == "task_name"
assert config.description is ""
assert config.expected_output is ""
assert config.agent is ""
assert config.description == ""
assert config.expected_output == ""
assert config.agent == ""

def test_read_minimal_yaml(self):
shutil.copy(BASE_PATH / "fixtures/tasks_min.yaml", self.project_dir / TASKS_FILENAME)
config = TaskConfig("task_name")
assert config.name == "task_name"
assert config.description is ""
assert config.expected_output is ""
assert config.agent is ""
assert config.description == ""
assert config.expected_output == ""
assert config.agent == ""

def test_read_maximal_yaml(self):
shutil.copy(BASE_PATH / "fixtures/tasks_max.yaml", self.project_dir / TASKS_FILENAME)
Expand Down
21 changes: 18 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,25 @@ envlist = py310,py311,py312
deps =
pytest
parameterized
coverage
mypy: mypy
commands =
pytest -v {posargs}
mypy: mypy agentops
coverage run --source=. --omit="**/tmp/**,./tmp/**/*" -m pytest -v {posargs}
coverage report -m
coverage xml
mypy: mypy agentstack
setenv =
AGENTSTACK_TELEMETRY_OPT_OUT = 1
AGENTSTACK_UPDATE_DISABLE = 1
AGENTSTACK_UPDATE_DISABLE = 1

[coverage:run]
branch = True
source = .
omit =
**/tmp/**
./tmp/**/*

[coverage:report]
omit =
**/tmp/**
./tmp/**/*
Loading