Skip to content

Commit

Permalink
feat: add code cov (#19)
Browse files Browse the repository at this point in the history
* feat: add code cov

* add coverage file

* run prettier

* generate code cov reports in gh

* fix run command

* fix again
  • Loading branch information
tushar5526 authored Jan 18, 2024
1 parent cb291eb commit 1a81ad1
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
Binary file added .coverage
Binary file not shown.
10 changes: 9 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Run pytest on PR
name: Run tests and code-cov

on:
push:
Expand Down Expand Up @@ -37,3 +37,11 @@ jobs:

- name: Run pytest
run: python -m pytest -vvv

- name: Generate Code Coverage Reports
run: coverage run -m pytest

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
pytest==7.4.4
pytest-mock==3.12.0
pre-commit==3.6.0
pre-commit==3.6.0
coverage==7.4.0

0 comments on commit 1a81ad1

Please sign in to comment.