fix tests and workflows

This commit is contained in:
Ivan Schaller 2024-02-01 14:22:25 +01:00
parent ea1eab403d
commit 6fda875a48
4 changed files with 66 additions and 9 deletions

View file

@ -8,12 +8,12 @@ on:
branches: [main, master]
jobs:
check-code:
check-code-py311:
uses: actions/workflows/.gitea/workflows/check_python_hatch.yml@master
with:
run-tests: true
scan-code:
scan-code-py311:
uses: actions/workflows/.gitea/workflows/sonarqube_python.yml@master
needs: [check-code]
if: gitea.event_name != 'pull_request'
@ -31,3 +31,57 @@ jobs:
python3 -m pip install mkdocs
cd docs || exit 1
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

View file

@ -1,7 +1,7 @@
import sys
import mangadlp.cli
import src.mangadlp.cli
if __name__ == "__main__":
sys.exit(mangadlp.cli.main()) # pylint: disable=no-value-for-parameter
sys.exit(src.mangadlp.cli.main())

View file

@ -8,6 +8,7 @@ description = "A cli manga downloader"
readme = "README.md"
license = "MIT"
requires-python = ">=3.8"
dynamic = ["version"]
authors = [{ name = "Ivan Schaller", email = "ivan@schaller.sh" }]
keywords = ["manga", "downloader", "mangadex"]
classifiers = [
@ -59,6 +60,8 @@ packages = ["src/mangadlp"]
dependencies = [
"pytest==7.4.3",
"coverage==7.3.2",
"xmltodict>=0.13.0",
"xmlschema>=2.2.1",
]
[tool.hatch.envs.default.scripts]

View file

@ -133,7 +133,7 @@ def test_metadata_chapter_validity(wait_20s: MonkeyPatch):
"",
"--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"
command = ["python3", script_path, *command_args]