Skip to content

Commit

Permalink
ci: upload coverage reports to Codecov (#12)
Browse files Browse the repository at this point in the history
  • Loading branch information
paduszyk authored May 22, 2024
1 parent 2c659ca commit af97592
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Codecov YAML
# https://docs.codecov.com/docs/codecovyml-reference

codecov:
branch: main

coverage:
status:
project:
default:
target: auto
threshold: 0%
patch:
default:
target: auto
threshold: 0%
15 changes: 15 additions & 0 deletions .github/workflows/python-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,3 +110,18 @@ jobs:
- run: python -m pip install --upgrade pip
- run: python -m pip install nox
- run: nox --session "${{ matrix.session.name }}"
- uses: actions/upload-artifact@v4
with:
name: coverage-${{ matrix.session.name }}
path: coverage.xml
codecov-upload:
name: Uplaod coverage to Codecov
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
2 changes: 2 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

[![Pre-commit](https://img.shields.io/github/actions/workflow/status/paduszyk/django-xlsx-serializer/pre-commit-run.yml?style=flat-square&label=pre-commit&logo=pre-commit)][pre-commit]
[![Python: CI](https://img.shields.io/github/actions/workflow/status/paduszyk/django-xlsx-serializer/python-ci.yml?style=flat-square&logo=github&label=CI)][python-ci]
[![Codecov](https://img.shields.io/codecov/c/github/paduszyk/django-xlsx-serializer?style=flat-square&logo=codecov)][codecov]

[![Nox](https://img.shields.io/badge/%F0%9F%A6%8A-Nox-D85E00.svg?style=flat-square)][nox]
[![Ruff](https://img.shields.io/endpoint?style=flat-square&url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)][ruff]
Expand All @@ -17,6 +18,7 @@ Created and maintained by Kamil Paduszyński ([@paduszyk][paduszyk]).

Released under the [MIT license][license].

[codecov]: https://app.codecov.io/gh/paduszyk/django-xlsx-serializer
[conventional-commits]: https://www.conventionalcommits.org/en/v1.0.0/
[license]: https://github.com/paduszyk/django-xlsx-serializer/blob/main/LICENSE
[mypy]: https://mypy.readthedocs.io
Expand Down

0 comments on commit af97592

Please sign in to comment.