fix tests and workflows
This commit is contained in:
parent
ea1eab403d
commit
6fda875a48
4 changed files with 66 additions and 9 deletions
|
@ -8,12 +8,12 @@ on:
|
||||||
branches: [main, master]
|
branches: [main, master]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-code:
|
check-code-py311:
|
||||||
uses: actions/workflows/.gitea/workflows/check_python_hatch.yml@master
|
uses: actions/workflows/.gitea/workflows/check_python_hatch.yml@master
|
||||||
with:
|
with:
|
||||||
run-tests: true
|
run-tests: true
|
||||||
|
|
||||||
scan-code:
|
scan-code-py311:
|
||||||
uses: actions/workflows/.gitea/workflows/sonarqube_python.yml@master
|
uses: actions/workflows/.gitea/workflows/sonarqube_python.yml@master
|
||||||
needs: [check-code]
|
needs: [check-code]
|
||||||
if: gitea.event_name != 'pull_request'
|
if: gitea.event_name != 'pull_request'
|
||||||
|
@ -31,3 +31,57 @@ jobs:
|
||||||
python3 -m pip install mkdocs
|
python3 -m pip install mkdocs
|
||||||
cd docs || exit 1
|
cd docs || exit 1
|
||||||
mkdocs build --strict
|
mkdocs build --strict
|
||||||
|
|
||||||
|
check-code-py38:
|
||||||
|
runs-on: python38
|
||||||
|
steps:
|
||||||
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: install hatch
|
||||||
|
run: pip install -U hatch
|
||||||
|
|
||||||
|
- name: test codestyle
|
||||||
|
run: hatch run lint:style
|
||||||
|
|
||||||
|
- name: test typing
|
||||||
|
run: hatch run lint:typing
|
||||||
|
|
||||||
|
- name: run tests
|
||||||
|
run: hatch run default:test
|
||||||
|
|
||||||
|
check-code-py39:
|
||||||
|
runs-on: python39
|
||||||
|
steps:
|
||||||
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: install hatch
|
||||||
|
run: pip install -U hatch
|
||||||
|
|
||||||
|
- name: test codestyle
|
||||||
|
run: hatch run lint:style
|
||||||
|
|
||||||
|
- name: test typing
|
||||||
|
run: hatch run lint:typing
|
||||||
|
|
||||||
|
- name: run tests
|
||||||
|
run: hatch run default:test
|
||||||
|
|
||||||
|
check-code-py310:
|
||||||
|
runs-on: python310
|
||||||
|
steps:
|
||||||
|
- name: checkout code
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: install hatch
|
||||||
|
run: pip install -U hatch
|
||||||
|
|
||||||
|
- name: test codestyle
|
||||||
|
run: hatch run lint:style
|
||||||
|
|
||||||
|
- name: test typing
|
||||||
|
run: hatch run lint:typing
|
||||||
|
|
||||||
|
- name: run tests
|
||||||
|
run: hatch run default:test
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
import mangadlp.cli
|
import src.mangadlp.cli
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
sys.exit(mangadlp.cli.main()) # pylint: disable=no-value-for-parameter
|
sys.exit(src.mangadlp.cli.main())
|
||||||
|
|
|
@ -8,6 +8,7 @@ description = "A cli manga downloader"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
requires-python = ">=3.8"
|
requires-python = ">=3.8"
|
||||||
|
dynamic = ["version"]
|
||||||
authors = [{ name = "Ivan Schaller", email = "ivan@schaller.sh" }]
|
authors = [{ name = "Ivan Schaller", email = "ivan@schaller.sh" }]
|
||||||
keywords = ["manga", "downloader", "mangadex"]
|
keywords = ["manga", "downloader", "mangadex"]
|
||||||
classifiers = [
|
classifiers = [
|
||||||
|
@ -59,6 +60,8 @@ packages = ["src/mangadlp"]
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"pytest==7.4.3",
|
"pytest==7.4.3",
|
||||||
"coverage==7.3.2",
|
"coverage==7.3.2",
|
||||||
|
"xmltodict>=0.13.0",
|
||||||
|
"xmlschema>=2.2.1",
|
||||||
]
|
]
|
||||||
|
|
||||||
[tool.hatch.envs.default.scripts]
|
[tool.hatch.envs.default.scripts]
|
||||||
|
|
|
@ -133,7 +133,7 @@ def test_metadata_chapter_validity(wait_20s: MonkeyPatch):
|
||||||
"",
|
"",
|
||||||
"--debug",
|
"--debug",
|
||||||
]
|
]
|
||||||
schema = xmlschema.XMLSchema("mangadlp/metadata/ComicInfo_v2.0.xsd")
|
schema = xmlschema.XMLSchema("src/mangadlp/metadata/ComicInfo_v2.0.xsd")
|
||||||
|
|
||||||
script_path = "manga-dlp.py"
|
script_path = "manga-dlp.py"
|
||||||
command = ["python3", script_path, *command_args]
|
command = ["python3", script_path, *command_args]
|
||||||
|
|
Loading…
Reference in a new issue