Skip to content

Commit

Permalink
Fix coverage reporting
Browse files Browse the repository at this point in the history
  • Loading branch information
monim67 committed Oct 3, 2022
1 parent 7fa5acc commit 7770fd5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:

- name: Install dependencies
run: |
poetry env use ${{ matrix.python-version }}
poetry install --no-root --only build --no-ansi --no-interaction
poetry run pip install -c tests/pip-constraints.txt .
Expand Down Expand Up @@ -62,6 +63,7 @@ jobs:

- name: Install dependencies
run: |
poetry env use ${{ matrix.python-version }}
poetry install --no-root --only build --no-ansi --no-interaction
poetry run pip install -c tests/pip-constraints.txt .
Expand Down
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ This project is licensed under MIT License - see the
:alt: Build Status
:height: 20px

.. |coverage.io| image:: https://coveralls.io/repos/github/monim67/poetry-bumpversion/badge.svg?branch=master
:target: https://coveralls.io/github/monim67/poetry-bumpversion?branch=master
.. |coverage.io| image:: https://coveralls.io/repos/github/monim67/poetry-bumpversion/badge.svg
:target: https://coveralls.io/github/monim67/poetry-bumpversion
:alt: Coverage Status
:height: 20px

Expand Down
9 changes: 8 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,14 @@ add_select = "D401,D404"

[tool.coverage.run]
command_line = "-m pytest"
source = ["src"]
source = ["poetry_bumpversion"]
parallel = true

[tool.coverage.paths]
source = [
"src/poetry_bumpversion",
"**/site-packages/poetry_bumpversion",
]

[tool.tox]
legacy_tox_ini = """
Expand Down
6 changes: 2 additions & 4 deletions tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
import subprocess
from pathlib import Path

plugin_source_dir: Path = Path.cwd() / "src"
testing_assets: Path = Path(__file__).parent / "assets"
plugin_pyproject_file: Path = Path.cwd() / "pyproject.toml"


def copy_project(project_name: str, destination_dir: Path) -> Path:
Expand Down Expand Up @@ -39,9 +39,7 @@ def execute_update_version_command(
[
"coverage",
"run",
"--source",
str(plugin_source_dir),
"--parallel-mode",
f"--rcfile={plugin_pyproject_file}",
"-m",
"poetry",
"version",
Expand Down

0 comments on commit 7770fd5

Please sign in to comment.