Skip to content

Commit

Permalink
👷 codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
juftin authored Dec 23, 2023
1 parent 01f21b0 commit 4d38446
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 24 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,12 @@ jobs:
- name: Test Suite
run: |
echo "::add-matcher::.github/workflows/matchers/python.json"
hatch run +py=${{ matrix.python }} all:cov
hatch run +py=${{ matrix.python }} all:cov --cov-report=xml tests
echo "::remove-matcher owner=python::"
env:
VCR_RECORD_MODE: none
- name: Upload coverage reports to Codecov
if: matrix.python == '3.11'
uses: codecov/codecov-action@v3
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@
<a href="https://github.com/juftin/lunchable"><img src="https://img.shields.io/pypi/v/lunchable?color=blue&label=lunchable" alt="PyPI"></a>
<a href="https://pypi.python.org/pypi/lunchable/"><img src="https://img.shields.io/pypi/pyversions/lunchable" alt="PyPI - Python Version"></a>
<a href="https://hub.docker.com/r/juftin/lunchable"><img src="https://img.shields.io/docker/v/juftin/lunchable?color=blue&label=docker&logo=docker" alt="Docker Image Version"></a>
<a href="https://github.com/juftin/lunchable/actions/workflows/tests.yaml?query=branch%3Amain"><img src="https://github.com/juftin/lunchable/actions/workflows/tests.yaml/badge.svg?branch=main" alt="Testing Status"></a>
<a href="https://github.com/juftin/lunchable/blob/main/LICENSE"><img src="https://img.shields.io/github/license/juftin/lunchable?color=blue&label=License" alt="GitHub License"></a>
<a href="https://github.com/juftin/lunchable/actions/workflows/tests.yaml?query=branch%3Amain"><img src="https://github.com/juftin/lunchable/actions/workflows/tests.yaml/badge.svg?branch=main" alt="Testing Status"></a>
<a href="https://codecov.io/gh/juftin/lunchable"><img src="https://codecov.io/gh/juftin/lunchable/graph/badge.svg?token=2IGD9E5L8K"/></a>
<a href="https://github.com/pypa/hatch"><img src="https://img.shields.io/badge/%F0%9F%A5%9A-Hatch-4051b5.svg" alt="Hatch project"></a>
<a href="https://github.com/astral-sh/ruff"><img src="https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json" alt="Ruff"></a>
<a href="https://github.com/pre-commit/pre-commit"><img src="https://img.shields.io/badge/pre--commit-enabled-lightgreen?logo=pre-commit" alt="pre-commit"></a>
Expand Down
12 changes: 2 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -165,23 +165,15 @@ typing = [

[tool.hatch.envs.test]
dependencies = [
"coverage[toml]>=6.5",
"pytest",
"pytest-cov",
"pytest-mock",
"vcrpy~=5.1.0"
]

[tool.hatch.envs.test.scripts]
cov = [
"test-cov",
"cov-report"
]
cov-report = [
"- coverage combine",
"coverage report -m"
]
cov = "pytest --cov --cov-config=pyproject.toml --cov-report term-missing {args:tests}"
test = "pytest {args:tests}"
test-cov = "coverage run -m pytest {args:tests}"

[tool.hatch.version]
path = "lunchable/_version.py"
Expand Down
7 changes: 5 additions & 2 deletions requirements/requirements-all.py3.10.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by hatch-pip-compile with Python 3.10
#
# - coverage[toml]>=6.5
# - pytest
# - pytest-cov
# - pytest-mock
# - vcrpy~=5.1.0
# - click>=8.0.1
Expand All @@ -29,8 +29,8 @@ click==8.1.7
# via hatch.envs.all.py3.10
coverage==7.3.3
# via
# hatch.envs.all.py3.10
# coverage
# pytest-cov
exceptiongroup==1.2.0
# via
# anyio
Expand Down Expand Up @@ -74,7 +74,10 @@ pygments==2.17.2
pytest==7.4.3
# via
# hatch.envs.all.py3.10
# pytest-cov
# pytest-mock
pytest-cov==4.1.0
# via hatch.envs.all.py3.10
pytest-mock==3.12.0
# via hatch.envs.all.py3.10
python-dateutil==2.8.2
Expand Down
7 changes: 5 additions & 2 deletions requirements/requirements-all.py3.11.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by hatch-pip-compile with Python 3.11
#
# - coverage[toml]>=6.5
# - pytest
# - pytest-cov
# - pytest-mock
# - vcrpy~=5.1.0
# - click>=8.0.1
Expand All @@ -29,8 +29,8 @@ click==8.1.7
# via hatch.envs.all.py3.11
coverage==7.3.3
# via
# hatch.envs.all.py3.11
# coverage
# pytest-cov
h11==0.14.0
# via httpcore
httpcore==1.0.2
Expand Down Expand Up @@ -70,7 +70,10 @@ pygments==2.17.2
pytest==7.4.3
# via
# hatch.envs.all.py3.11
# pytest-cov
# pytest-mock
pytest-cov==4.1.0
# via hatch.envs.all.py3.11
pytest-mock==3.12.0
# via hatch.envs.all.py3.11
python-dateutil==2.8.2
Expand Down
7 changes: 5 additions & 2 deletions requirements/requirements-all.py3.12.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by hatch-pip-compile with Python 3.12
#
# - coverage[toml]>=6.5
# - pytest
# - pytest-cov
# - pytest-mock
# - vcrpy~=5.1.0
# - click>=8.0.1
Expand All @@ -29,8 +29,8 @@ click==8.1.7
# via hatch.envs.all.py3.12
coverage==7.3.3
# via
# hatch.envs.all.py3.12
# coverage
# pytest-cov
h11==0.14.0
# via httpcore
httpcore==1.0.2
Expand Down Expand Up @@ -70,7 +70,10 @@ pygments==2.17.2
pytest==7.4.3
# via
# hatch.envs.all.py3.12
# pytest-cov
# pytest-mock
pytest-cov==4.1.0
# via hatch.envs.all.py3.12
pytest-mock==3.12.0
# via hatch.envs.all.py3.12
python-dateutil==2.8.2
Expand Down
7 changes: 5 additions & 2 deletions requirements/requirements-all.py3.8.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by hatch-pip-compile with Python 3.8
#
# - coverage[toml]>=6.5
# - pytest
# - pytest-cov
# - pytest-mock
# - vcrpy~=5.1.0
# - click>=8.0.1
Expand All @@ -29,8 +29,8 @@ click==8.1.7
# via hatch.envs.all.py3.8
coverage==7.3.3
# via
# hatch.envs.all.py3.8
# coverage
# pytest-cov
exceptiongroup==1.2.0
# via
# anyio
Expand Down Expand Up @@ -74,7 +74,10 @@ pygments==2.17.2
pytest==7.4.3
# via
# hatch.envs.all.py3.8
# pytest-cov
# pytest-mock
pytest-cov==4.1.0
# via hatch.envs.all.py3.8
pytest-mock==3.12.0
# via hatch.envs.all.py3.8
python-dateutil==2.8.2
Expand Down
7 changes: 5 additions & 2 deletions requirements/requirements-all.py3.9.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#
# This file is autogenerated by hatch-pip-compile with Python 3.9
#
# - coverage[toml]>=6.5
# - pytest
# - pytest-cov
# - pytest-mock
# - vcrpy~=5.1.0
# - click>=8.0.1
Expand All @@ -29,8 +29,8 @@ click==8.1.7
# via hatch.envs.all.py3.9
coverage==7.3.3
# via
# hatch.envs.all.py3.9
# coverage
# pytest-cov
exceptiongroup==1.2.0
# via
# anyio
Expand Down Expand Up @@ -74,7 +74,10 @@ pygments==2.17.2
pytest==7.4.3
# via
# hatch.envs.all.py3.9
# pytest-cov
# pytest-mock
pytest-cov==4.1.0
# via hatch.envs.all.py3.9
pytest-mock==3.12.0
# via hatch.envs.all.py3.9
python-dateutil==2.8.2
Expand Down
7 changes: 5 additions & 2 deletions requirements/requirements-test.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
#
# [constraints] requirements.txt (SHA256: 1d7f43c7c1ecbc074ece84ddfddf590007473fce44e813c9dca4481292391f67)
#
# - coverage[toml]>=6.5
# - pytest
# - pytest-cov
# - pytest-mock
# - vcrpy~=5.1.0
# - click>=8.0.1
Expand Down Expand Up @@ -40,8 +40,8 @@ click==8.1.7
# hatch.envs.test
coverage==7.3.3
# via
# hatch.envs.test
# coverage
# pytest-cov
h11==0.14.0
# via
# -c requirements.txt
Expand Down Expand Up @@ -104,7 +104,10 @@ pygments==2.17.2
pytest==7.4.3
# via
# hatch.envs.test
# pytest-cov
# pytest-mock
pytest-cov==4.1.0
# via hatch.envs.test
pytest-mock==3.12.0
# via hatch.envs.test
python-dateutil==2.8.2
Expand Down

0 comments on commit 4d38446

Please sign in to comment.