diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 309e07d..59eda22 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,6 +57,7 @@ jobs: uv run coverage erase uv run coverage run -m pytest uv run coverage report + uv run coverage xml - name: Upload coverage data if: always() uses: actions/upload-artifact@v7 @@ -66,6 +67,11 @@ jobs: include-hidden-files: true if-no-files-found: error retention-days: 7 + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v6 + with: + files: coverage.xml + fail_ci_if_error: false build: name: Build & audit package diff --git a/.gitignore b/.gitignore index f61d98c..2148e53 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ build/ .pytest_cache/ .tox/ .coverage +coverage.xml htmlcov/ .mypy_cache/ .ruff_cache/ diff --git a/README.md b/README.md index 907536a..6efe1f4 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # GCode ![Build](https://github.com/shauryagangrade/GCode/actions/workflows/ci.yml/badge.svg) +[![codecov](https://codecov.io/gh/shauryagangrade/GCode/branch/main/graph/badge.svg)](https://codecov.io/gh/shauryagangrade/GCode) [![License: Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](LICENSE) [![PyPI version](https://img.shields.io/pypi/v/gcode.svg)](https://pypi.org/project/gcode/) [![Stars](https://img.shields.io/github/stars/shauryagangrade/GCode?style=social)](https://github.com/shauryagangrade/GCode)