Skip to content
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
21 changes: 21 additions & 0 deletions .github/tests/renovate_config_contract_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ def test_gomod_updates_are_tidied(self):

self.assertIn("gomodTidy", config.get("postUpdateOptions", []))

def test_portwing_lock_maintenance_is_disabled_exactly(self):
Comment thread
coderabbitai[bot] marked this conversation as resolved.
config = self.read_config()

matches = [
rule
for rule in config.get("packageRules", [])
if rule.get("matchRepositories") == ["CodesWhat/portwing"]
]

self.assertEqual(1, len(matches))
self.assertEqual(["lockFileMaintenance"], matches[0].get("matchUpdateTypes"))
self.assertIs(matches[0].get("enabled"), False)

def test_validation_runs_this_contract(self):
command = "python3 .github/tests/renovate_config_contract_test.py"
validation = (ROOT / "scripts/validate.sh").read_text()
workflow = (ROOT / ".github/workflows/standards-validation.yml").read_text()

self.assertEqual(1, validation.count(command))
self.assertEqual(1, workflow.count(command))


if __name__ == "__main__":
unittest.main()
1 change: 1 addition & 0 deletions .github/workflows/standards-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ jobs:
python3 .github/tests/greptile_config_contract_test.py
python3 .github/tests/quality_report_contract_test.py
python3 .github/tests/reusable_ci_contract_test.py
python3 .github/tests/renovate_config_contract_test.py
python3 .github/tests/starchart_refresh_contract_test.py
python3 .github/tests/main_is_released_contract_test.py

Expand Down
10 changes: 10 additions & 0 deletions renovate-config.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,16 @@
],
"groupName": "vite ecosystem",
"groupSlug": "vite-ecosystem"
},
{
"description": "Disable npm lock maintenance for Portwing because native packages are platform-specific",
"matchRepositories": [
"CodesWhat/portwing"
],
"matchUpdateTypes": [
"lockFileMaintenance"
],
"enabled": false
}
]
}
1 change: 1 addition & 0 deletions scripts/validate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ python3 .github/tests/greptile_summon_contract_test.py
python3 .github/tests/greptile_config_contract_test.py
python3 .github/tests/quality_report_contract_test.py
python3 .github/tests/reusable_ci_contract_test.py
python3 .github/tests/renovate_config_contract_test.py

echo "==> compile python"
python3 -m compileall -q .
Expand Down
Loading