Added some todos and extended mypy ci-pipeline
This commit is contained in:
parent
4667c58dbb
commit
1ba7f01b93
4 changed files with 6 additions and 3 deletions
|
@ -22,6 +22,7 @@ mypy:
|
||||||
script:
|
script:
|
||||||
- pip install -r dev_requirements.txt
|
- pip install -r dev_requirements.txt
|
||||||
- python -m mypy src/main/python/ddadevops/*.py --ignore-missing-imports
|
- python -m mypy src/main/python/ddadevops/*.py --ignore-missing-imports
|
||||||
|
- python -m mypy src/main/python/ddadevops/*/*.py --ignore-missing-imports
|
||||||
|
|
||||||
pylint:
|
pylint:
|
||||||
stage: lint&test
|
stage: lint&test
|
||||||
|
|
|
@ -22,7 +22,7 @@ class FileHandler(ABC):
|
||||||
case _:
|
case _:
|
||||||
raise Exception(
|
raise Exception(
|
||||||
f'The file type "{config_file_type}" is not implemented')
|
f'The file type "{config_file_type}" is not implemented')
|
||||||
|
# TODO: Attribute is only set in classmethod. Should this be initialized outside of this class?
|
||||||
file_handler.config_file_path = file_path
|
file_handler.config_file_path = file_path
|
||||||
file_handler.config_file_type = config_file_type
|
file_handler.config_file_type = config_file_type
|
||||||
return file_handler
|
return file_handler
|
||||||
|
|
|
@ -10,6 +10,7 @@ class PrepareReleaseService():
|
||||||
self.git_api = GitApi()
|
self.git_api = GitApi()
|
||||||
|
|
||||||
def __write_and_commit_version(self, version: Version, commit_message: str):
|
def __write_and_commit_version(self, version: Version, commit_message: str):
|
||||||
|
# TODO: isValid is missing
|
||||||
self.release.validate(self.release_repo.main_branch)
|
self.release.validate(self.release_repo.main_branch)
|
||||||
|
|
||||||
self.release_repo.version_repository.write_file(version.get_version_string())
|
self.release_repo.version_repository.write_file(version.get_version_string())
|
||||||
|
@ -30,6 +31,7 @@ class TagAndPushReleaseService():
|
||||||
def tag_release(self, release: Release):
|
def tag_release(self, release: Release):
|
||||||
annotation = 'v' + release.version.get_version_string()
|
annotation = 'v' + release.version.get_version_string()
|
||||||
message = 'Release ' + annotation
|
message = 'Release ' + annotation
|
||||||
|
# TODO: Why is the count a parameter? We always tag the second last commit in this process.
|
||||||
self.git_api.tag_annotated(annotation, message, 1)
|
self.git_api.tag_annotated(annotation, message, 1)
|
||||||
|
|
||||||
def push_release(self):
|
def push_release(self):
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
import pytest as pt
|
import pytest as pt
|
||||||
|
|
||||||
from src.main.python.ddadevops.release_mixin.infrastructure_api import GitApi, EnvironmentApi
|
from src.main.python.ddadevops.release_mixin.infrastructure_api import GitApi, EnvironmentApi, JsonFileHandler
|
||||||
from src.main.python.ddadevops.release_mixin.infrastructure import VersionRepository
|
from src.main.python.ddadevops.release_mixin.infrastructure import VersionRepository
|
||||||
from src.main.python.ddadevops.release_mixin.domain import ReleaseType
|
from src.main.python.ddadevops.release_mixin.domain import ReleaseType
|
||||||
|
|
||||||
|
@ -100,4 +100,4 @@ def test_python(tmp_path):
|
||||||
repo.write_file(version.get_version_string())
|
repo.write_file(version.get_version_string())
|
||||||
|
|
||||||
# check
|
# check
|
||||||
assert '3.1.3-SNAPSHOT' in th.TEST_FILE_PATH.read_text()
|
assert '3.1.3-SNAPSHOT' in th.TEST_FILE_PATH.read_text()
|
||||||
|
|
Loading…
Reference in a new issue