Skip to content

Commit 9fa6901

Browse files
committed
ci: upload coverage artifacts to Codecov
1 parent 2694ecd commit 9fa6901

File tree

3 files changed

+29
-0
lines changed

3 files changed

+29
-0
lines changed

.github/codecov.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
codecov:
2+
branch: main
3+
4+
coverage:
5+
status:
6+
project:
7+
default:
8+
target: auto
9+
threshold: 0%
10+
patch:
11+
default:
12+
target: auto
13+
threshold: 0%

.github/workflows/package-ci.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,17 @@ jobs:
6464
- uses: actions/checkout@v4
6565
- uses: wntrblm/nox@main
6666
- run: nox -s "${{ matrix.session }}"
67+
- uses: actions/upload-artifact@v4
68+
with:
69+
name: coverage_${{ matrix.session }}
70+
path: coverage.xml
71+
codecov:
72+
needs:
73+
- test
74+
runs-on: ubuntu-latest
75+
steps:
76+
- uses: actions/checkout@v4
77+
- uses: actions/download-artifact@v4
78+
- uses: codecov/codecov-action@v4
79+
with:
80+
token: ${{ secrets.CODECOV_TOKEN }}

docs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
[![Pre-commit.ci](https://results.pre-commit.ci/badge/github/paduszyk/django-management-commands/main.svg)][pre-commit.ci]
44
[![CI](https://img.shields.io/github/actions/workflow/status/paduszyk/django-management-commands/package-ci.yml?logo=github&label=CI)][ci]
5+
[![Codecov](https://img.shields.io/codecov/c/github/paduszyk/django-management-commands?logo=codecov)][codecov]
56

67
[![Nox](https://img.shields.io/badge/%f0%9f%a6%8a-Nox-d85e00)][nox]
78
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)][ruff]
@@ -14,6 +15,7 @@
1415
Released under the [MIT license][license].
1516

1617
[ci]: https://github.com/paduszyk/django-management-commands/actions/workflows/package-ci.yml
18+
[codecov]: https://app.codecov.io/gh/paduszyk/django-management-commands
1719
[conventional-commits]: https://www.conventionalcommits.org/
1820
[license]: https://github.com/paduszyk/django-management-commands/blob/main/LICENSE
1921
[mypy]: https://mypy.readthedocs.io

0 commit comments

Comments
 (0)