Skip to content

Commit c1dd2cb

Browse files
authored
Add codecov (#58)
1 parent c1af348 commit c1dd2cb

File tree

4 files changed

+465
-22
lines changed

4 files changed

+465
-22
lines changed

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,14 @@ jobs:
3939
- name: Run unittests
4040
uses: pavelzw/pytest-action@510c5e90c360a185039bea56ce8b3e7e51a16507
4141
with:
42-
custom-pytest: pixi run -e ${{ matrix.env }} pytest
42+
custom-pytest: pixi run -e ${{ matrix.env }} coverage
4343
report-title: ${{ matrix.env }}
44+
- name: Upload coverage reports to Codecov
45+
if: matrix.env == 'py312'
46+
uses: codecov/codecov-action@54bcd8715eee62d40e33596ef5e8f0f48dbbccab
47+
env:
48+
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
49+
file: ./coverage.xml
4450

4551
pre-commit-checks:
4652
# TODO: switch to pixi once there is a good way

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[![conda-forge][conda-forge-badge]][conda-forge]
66
[![pypi-version][pypi-badge]][pypi]
77
[![python-version][python-version-badge]][pypi]
8+
[![codecov][codecov-badge]][codecov]
89

910
[license-badge]: https://img.shields.io/github/license/quantco/polarify?style=flat-square
1011
[build-badge]: https://img.shields.io/github/actions/workflow/status/quantco/polarify/ci.yml?style=flat-square&branch=main
@@ -14,6 +15,8 @@
1415
[pypi]: https://pypi.org/project/polarify
1516
[pypi-badge]: https://img.shields.io/pypi/v/polarify.svg?style=flat-square&logo=pypi&logoColor=white
1617
[python-version-badge]: https://img.shields.io/pypi/pyversions/polarify?style=flat-square&logoColor=white&logo=python
18+
[codecov-badge]: https://codecov.io/gh/quantco/polarify/branch/main/graph/badge.svg
19+
[codecov]: https://codecov.io/gh/quantco/polarify
1720

1821
Welcome to **polarIFy**, a Python function decorator that simplifies the way you write logical statements for Polars. With polarIFy, you can use Python's language structures like `if / elif / else` statements and transform them into `pl.when(..).then(..).otherwise(..)` statements. This makes your code more readable and less cumbersome to write. 🎉
1922

0 commit comments

Comments
 (0)