Skip to content

Commit 67ea39f

Browse files
authored
Merge pull request #4 from fopina/badges_and_shit
Badges and other stuff
2 parents b61e2b1 + 8940d6f commit 67ea39f

6 files changed

Lines changed: 65 additions & 38 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

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ pytest-cov = "*"
77
twine = "*"
88
build = "*"
99
pyproject-pipenv = "*"
10+
pytest-socket = "*"
1011

1112
[requires]
1213
python_version = "3.10"

Pipfile.lock

Lines changed: 39 additions & 30 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

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

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ line-ending = "auto"
5656

5757
[tool.pytest.ini_options]
5858
minversion = "6.0"
59-
addopts = "-ra -q"
59+
addopts = "-ra -q --disable-socket"
6060
testpaths = [
6161
"tests",
6262
]

0 commit comments

Comments
 (0)