Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Skip install step when metadata is unchanged #99

Merged
merged 3 commits into from
Nov 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ jobs:

## See also

Validate your KSP-AVC .version files with https://github.com/DasSkelett/AVC-VersionFileValidator !
Validate your KSP-AVC .version files with <https://github.com/DasSkelett/AVC-VersionFileValidator>!

## Contributions

Expand Down
4 changes: 4 additions & 0 deletions ckan_meta_tester/ckan_meta_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,10 @@ def install_ckan(self, file: Path, orig_file: Path, pr_body: Optional[str], meta
if meta_repo is not None:
diff = ckan.find_diff(meta_repo)
if diff is not None:
if len(diff) == 0:
print(f'::notice file={orig_file}::Diff empty for {ckan.name} {ckan.version}, skipping install',
flush=True)
return True
with LogGroup(f'Diffing {ckan.name} {ckan.version}'):
print(diff, end='', flush=True)
with LogGroup(f'Installing {ckan.name} {ckan.version}'):
Expand Down
3 changes: 1 addition & 2 deletions tests/dummy_game_instance.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import unittest.util
from unittest import TestCase
from unittest.mock import Mock, patch, call
from tempfile import TemporaryDirectory, TemporaryFile

from ckan_meta_tester.game import Game
from ckan_meta_tester.game_version import GameVersion
Expand All @@ -26,7 +25,7 @@ def test_dummy_game_instance_calls(self,
mocked_run: Mock) -> None:

# Arrange
unittest.util._MAX_LENGTH=999999999 # :snake:
unittest.util._MAX_LENGTH=999999999 # type: ignore # pylint: disable=protected-access

# Act
with DummyGameInstance(
Expand Down