run test lint
This commit is contained in:
parent
24bcf58b42
commit
76ba3caa33
5 changed files with 41 additions and 3 deletions
2
.flake8
Normal file
2
.flake8
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
[flake8]
|
||||||
|
ignore = E501, W503, F541, E203
|
||||||
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
|
@ -27,3 +27,5 @@ jobs:
|
||||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: waylonwalker/hatch-version-action@v1
|
- uses: waylonwalker/hatch-version-action@v1
|
||||||
|
args:
|
||||||
|
beforeCommand: "test-lint"
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
# SPDX-FileCopyrightText: 2022-present Waylon S. Walker <waylon@waylonwalker.com>
|
# SPDX-FileCopyrightText: 2022-present Waylon S. Walker <waylon@waylonwalker.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
__version__ = '0.1.0.dev4'
|
__version__ = "0.1.0.dev4"
|
||||||
|
|
|
||||||
|
|
@ -26,6 +26,17 @@ classifiers = [
|
||||||
dependencies = []
|
dependencies = []
|
||||||
dynamic = ["version"]
|
dynamic = ["version"]
|
||||||
|
|
||||||
|
[project.optional-dependencies]
|
||||||
|
dev = [
|
||||||
|
"black",
|
||||||
|
"isort",
|
||||||
|
"seed-isort-config",
|
||||||
|
"flake8",
|
||||||
|
"pytest",
|
||||||
|
"pytest-cov",
|
||||||
|
"pytest-mock",
|
||||||
|
]
|
||||||
|
|
||||||
[project.urls]
|
[project.urls]
|
||||||
Documentation = "https://github.com/unknown/hatch-version-action-example#readme"
|
Documentation = "https://github.com/unknown/hatch-version-action-example#readme"
|
||||||
Issues = "https://github.com/unknown/hatch-version-action-example/issues"
|
Issues = "https://github.com/unknown/hatch-version-action-example/issues"
|
||||||
|
|
@ -36,12 +47,27 @@ path = "hatch_version_action_example/__about__.py"
|
||||||
|
|
||||||
[tool.hatch.envs.default]
|
[tool.hatch.envs.default]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pytest",
|
"black",
|
||||||
"pytest-cov",
|
"isort",
|
||||||
|
"seed-isort-config",
|
||||||
|
"flake8",
|
||||||
|
"pytest",
|
||||||
|
"pytest-cov",
|
||||||
|
"pytest-mock",
|
||||||
]
|
]
|
||||||
[tool.hatch.envs.default.scripts]
|
[tool.hatch.envs.default.scripts]
|
||||||
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=hatch_version_action_example --cov=tests"
|
cov = "pytest --cov-report=term-missing --cov-config=pyproject.toml --cov=hatch_version_action_example --cov=tests"
|
||||||
no-cov = "cov --no-cov"
|
no-cov = "cov --no-cov"
|
||||||
|
lint = "flake8 hatch_version_action_example"
|
||||||
|
format = "black --check hatch_version_action_example"
|
||||||
|
sort_imports = "isort hatch_version_action_example"
|
||||||
|
test-lint = [
|
||||||
|
"lint",
|
||||||
|
"format",
|
||||||
|
"seed-isort-config",
|
||||||
|
"sort-imports",
|
||||||
|
"cov",
|
||||||
|
]
|
||||||
|
|
||||||
[[tool.hatch.envs.test.matrix]]
|
[[tool.hatch.envs.test.matrix]]
|
||||||
python = ["37", "38", "39", "310", "311"]
|
python = ["37", "38", "39", "310", "311"]
|
||||||
|
|
@ -59,3 +85,7 @@ exclude_lines = [
|
||||||
"if __name__ == .__main__.:",
|
"if __name__ == .__main__.:",
|
||||||
"if TYPE_CHECKING:",
|
"if TYPE_CHECKING:",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[tool.isort]
|
||||||
|
profile = "black"
|
||||||
|
known_third_party = []
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,7 @@
|
||||||
# SPDX-FileCopyrightText: 2022-present Waylon S. Walker <waylon@waylonwalker.com>
|
# SPDX-FileCopyrightText: 2022-present Waylon S. Walker <waylon@waylonwalker.com>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
|
||||||
|
def test_me():
|
||||||
|
assert True
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue