Skip to content

Commit 8940d6f

Browse files
committed
badges
1 parent 46483c2 commit 8940d6f

3 files changed

Lines changed: 24 additions & 7 deletions

File tree

.github/workflows/test.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,17 @@ jobs:
3838
run: |
3939
make test
4040
41+
- name: Upload results to Codecov
42+
uses: codecov/codecov-action@v4
43+
with:
44+
token: ${{ secrets.CODECOV_TOKEN }}
45+
46+
- name: Upload test results to Codecov
47+
if: ${{ !cancelled() }}
48+
uses: codecov/test-results-action@v1
49+
with:
50+
token: ${{ secrets.CODECOV_TOKEN }}
51+
4152
- name: Final check
4253
if: ${{ steps.lint-check.outcome == 'failure' }}
4354
run: |

Makefile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,11 @@ lint-check:
99
pyproject-pipenv
1010

1111
test:
12-
python -m pytest --cov
12+
if [ -n "$(GITHUB_RUN_ID)" ]; then \
13+
pytest --cov --cov-report=xml --junitxml=junit.xml -o junit_family=legacy; \
14+
else \
15+
python -m pytest --cov; \
16+
fi
1317

1418
testpub:
1519
rm -fr dist

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,5 @@
11
# python package template
22

3-
[![ci](https://github.com/fopina/python-package-template/actions/workflows/publish-main.yml/badge.svg)](https://github.com/fopina/python-package-template/actions/workflows/publish-main.yml)
4-
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/fp-github-template-example.svg)](https://pypi.python.org/pypi/fp-github-template-example/)
5-
[![PyPI version](https://badge.fury.io/py/fp-github-template-example.svg)](https://badge.fury.io/py/fp-github-template-example)
6-
[![Very popular](https://img.shields.io/pypi/dm/fp-github-template-example)](https://pypistats.org/packages/fp-github-template-example)
7-
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
8-
93
## Content
104

115
* `pytest` for tests: `make test`
@@ -41,6 +35,14 @@ Yet another approach is to simply use an entirely different package name for the
4135

4236
# fp-github-template-example
4337

38+
[![ci](https://github.com/fopina/python-package-template/actions/workflows/publish-main.yml/badge.svg)](https://github.com/fopina/python-package-template/actions/workflows/publish-main.yml)
39+
[![tests](https://github.com/fopina/python-package-template/actions/workflows/tests.yml/badge.svg)](https://github.com/fopina/python-package-template/actions/workflows/tests.yml)
40+
[![codecov](https://codecov.io/github/fopina/python-package-template/graph/badge.svg)](https://codecov.io/github/fopina/python-package-template)
41+
[![PyPI pyversions](https://img.shields.io/pypi/pyversions/fp-github-template-example.svg)](https://pypi.org/project/fp-github-template-example/)
42+
[![Current version on PyPi](https://img.shields.io/pypi/v/django-bulk-update-or-create)](https://pypi.org/project/fp-github-template-example/)
43+
[![Very popular](https://img.shields.io/pypi/dm/fp-github-template-example)](https://pypistats.org/packages/fp-github-template-example)
44+
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
45+
4446
CLI that echos whatever you tell it to.
4547

4648
## Install

0 commit comments

Comments
 (0)