Skip to content

Commit

Permalink
chore: enhance coverage tools
Browse files Browse the repository at this point in the history
  • Loading branch information
nullswan committed Apr 29, 2022
1 parent b2bc691 commit 9333c68
Show file tree
Hide file tree
Showing 7 changed files with 63 additions and 40 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- name: Run tests
run: |
source .venv/bin/activate
pytest --cov=$MODULE_NAME --cov-report=xml --cov-fail-under=$MIN_TEST_COV tests/unit
pytest --reruns=3 --cov=$MODULE_NAME --cov-report=xml --cov-fail-under=$MIN_TEST_COV tests/unit
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ dist/
setup.py
*.spec
snap
coverage.xml

# Logs
logs
Expand Down
72 changes: 36 additions & 36 deletions .hooks/pre-commit.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"type": "python",
"venvActivate": "./.venv/bin/activate",
"steps": [
{
"name": "autoflake",
"command": "autoflake -ri --remove-unused-variable --ignore-init-module-imports --remove-all-unused-imports graphinder tests"
},
{
"name": "isort",
"command": "isort -m 9 --line-length 159 graphinder tests"
},
{
"name": "unify",
"command": "unify -ri graphinder tests"
},
{
"name": "docformatter",
"command": "docformatter --wrap-summaries 160 --wrap-descriptions 160 -ri graphinder tests"
},
{
"name": "yapf",
"command": "yapf -ri graphinder tests"
},
{
"name": "pylint",
"command": "pylint --load-plugins pylint_quotes graphinder tests"
},
{
"name": "mypy",
"command": "mypy graphinder tests"
},
{
"name": "pytest",
"command": "pytest tests/unit"
}
]
"type": "python",
"venvActivate": "./.venv/bin/activate",
"steps": [
{
"name": "autoflake",
"command": "autoflake -ri --remove-unused-variable --ignore-init-module-imports --remove-all-unused-imports graphinder tests"
},
{
"name": "isort",
"command": "isort -m 9 --line-length 159 graphinder tests"
},
{
"name": "unify",
"command": "unify -ri graphinder tests"
},
{
"name": "docformatter",
"command": "docformatter --wrap-summaries 160 --wrap-descriptions 160 -ri graphinder tests"
},
{
"name": "yapf",
"command": "yapf -ri graphinder tests"
},
{
"name": "pylint",
"command": "pylint --load-plugins pylint_quotes graphinder tests"
},
{
"name": "mypy",
"command": "mypy graphinder tests"
},
{
"name": "pytest",
"command": "pytest --reruns=3 tests/unit"
}
]
}
2 changes: 1 addition & 1 deletion graphinder/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from datetime import date

__version__ = '1.0.30'
__version__ = '1.0.31'

print(
r"""
Expand Down
17 changes: 16 additions & 1 deletion poetry.lock

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

7 changes: 7 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ readme = "README.md"
[tool.poetry.scripts]
graphinder = 'graphinder:main'

[tool.coverage.run]
omit = [
'graphinder/__main__.py',
'tests/*'
]

[tool.pytest.ini_options]
asyncio_mode = 'strict'

Expand Down Expand Up @@ -54,6 +60,7 @@ autoflake = "^1.4"
pyinstaller = "^4.8"
mypy = "^0.921"
pytest-asyncio = "^0.18.3"
pytest-rerunfailures = "^10.2"

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

def test_version() -> None:
"""version test."""
assert __version__ == '1.0.30', 'Version has been changed, please update the test.'
assert __version__ == '1.0.31', 'Version has been changed, please update the test.'


def test_argument_builder() -> None:
Expand Down

0 comments on commit 9333c68

Please sign in to comment.