Skip to content

Commit

Permalink
add codecov bot
Browse files Browse the repository at this point in the history
  • Loading branch information
bboynton97 committed Jun 21, 2024
1 parent 823754e commit 373df4f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 5 deletions.
45 changes: 41 additions & 4 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,41 @@
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: Codecov

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest

strategy:
matrix:
python-version: [3.8, 3.9, 3.10]

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

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- 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
7 changes: 6 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,9 @@ deps =
commands =
coverage run --source agentops -m pytest
coverage report -m
mypy: mypy agentops
coverage xml
mypy: mypy agentops

[coverage:run]
branch = True
source = .

0 comments on commit 373df4f

Please sign in to comment.