Skip to content

Python SDK for AI agent monitoring, LLM cost tracking, benchmarking, and more. Integrates with most LLMs and agent frameworks including CrewAI, Agno, OpenAI Agents SDK, Langchain, Autogen, AG2, and CamelAI

add codecov bot (#263)

Braelyn Boynton635a9e3fbc08
diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml
new file mode 100644
index 00000000..c11602bf
--- /dev/null
+++ b/.github/workflows/codecov.yml
@@ -0,0 +1,37 @@
+name: Codecov
+
+on:
+ push:
+ branches: [ main ]
+ pull_request:
+ branches: [ main ]
+
+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
diff --git a/tox.ini b/tox.ini
index 5c56417c..1e9d06b7 100644
--- a/tox.ini
+++ b/tox.ini
@@ -23,4 +23,9 @@ deps =
commands =
coverage run --source agentops -m pytest
coverage report -m
- mypy: mypy agentops
\ No newline at end of file
+ coverage xml
+ mypy: mypy agentops
+
+[coverage:run]
+branch = True
+source = .
\ No newline at end of file