Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/coverage #1

Merged
merged 2 commits into from
Jul 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Workflow for Codecov
on: [push, pull_request]
jobs:
run:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r requirements-dev.lock
- name: Run tests and collect coverage
run: pytest --cov ${{ env.CODECOV_ATS_TESTS }}
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
verbose: true
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 @@ -2,6 +2,7 @@

[![image](https://img.shields.io/pypi/v/meator.svg)](https://pypi.python.org/pypi/meator)
<a href="http://mypy-lang.org/" target="_blank"><img src="https://img.shields.io/badge/mypy-checked-1F5082.svg" alt="Mypy checked"></a>
[![codecov](https://codecov.io/gh/likeinlife/cqrs_mediator/graph/badge.svg?token=BVDRFQ61R6)](https://codecov.io/gh/likeinlife/cqrs_mediator)
[![image](https://img.shields.io/pypi/l/meator.svg)](https://github.com/likeinlife/cqrs_mediator/blob/main/LICENSE)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![image](https://img.shields.io/pypi/pyversions/meator.svg)](https://pypi.python.org/pypi/meator)
Expand Down Expand Up @@ -97,4 +98,4 @@ async def main():

# Additional

Inspired by [didator](https://github.com/SamWarden/didiator)
Inspired by [didator](https://github.com/SamWarden/didiator)
86 changes: 84 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 29 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ test.optional = true
[tool.poetry.group.test.dependencies]
pytest-asyncio = "^0.23.7"
pytest = "^8.2.2"
pytest-cov = "^5.0.0"

[build-system]
requires = ["poetry-core"]
Expand Down Expand Up @@ -89,4 +90,31 @@ ignore_missing_imports = true
follow_imports = "normal"

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_mode = "auto"

[tool.coverage.report]
exclude_also = [
"def __repr__",
"if self.debug:",
"if settings.DEBUG",
"raise AssertionError",
"raise NotImplementedError",
"if 0:",
"if __name__ == .__main__.:",
"if TYPE_CHECKING:",
"class .*\\bProtocol\\):",
"@(abc\\.)?abstractmethod",
]
omit = [
# omit anything in a .local directory anywhere
"*/.local/*",
"__init__.py",
"tests/*",
"*/tests/*",
# omit anything in a .venv directory anywhere
".venv/*",
"*/containers/*",
"*/migrations/*",
"*/core/*",
"*/errors.py",
]
21 changes: 21 additions & 0 deletions requirements-dev.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
cfgv==3.4.0 ; python_version >= "3.11" and python_version < "4.0"
colorama==0.4.6 ; python_version >= "3.11" and python_version < "4.0" and sys_platform == "win32"
coverage[toml]==7.6.0 ; python_version >= "3.11" and python_version < "4.0"
distlib==0.3.8 ; python_version >= "3.11" and python_version < "4.0"
filelock==3.15.4 ; python_version >= "3.11" and python_version < "4.0"
identify==2.5.36 ; python_version >= "3.11" and python_version < "4.0"
iniconfig==2.0.0 ; python_version >= "3.11" and python_version < "4.0"
mypy-extensions==1.0.0 ; python_version >= "3.11" and python_version < "4.0"
mypy==1.10.1 ; python_version >= "3.11" and python_version < "4.0"
nodeenv==1.9.1 ; python_version >= "3.11" and python_version < "4.0"
packaging==24.1 ; python_version >= "3.11" and python_version < "4.0"
platformdirs==4.2.2 ; python_version >= "3.11" and python_version < "4.0"
pluggy==1.5.0 ; python_version >= "3.11" and python_version < "4.0"
pre-commit==3.7.1 ; python_version >= "3.11" and python_version < "4.0"
pytest-asyncio==0.23.7 ; python_version >= "3.11" and python_version < "4.0"
pytest-cov==5.0.0 ; python_version >= "3.11" and python_version < "4.0"
pytest==8.2.2 ; python_version >= "3.11" and python_version < "4.0"
pyyaml==6.0.1 ; python_version >= "3.11" and python_version < "4.0"
ruff==0.5.0 ; python_version >= "3.11" and python_version < "4.0"
typing-extensions==4.12.2 ; python_version >= "3.11" and python_version < "4.0"
virtualenv==20.26.3 ; python_version >= "3.11" and python_version < "4.0"
Loading