ci: add a check that a 'state' key does exist for every app in the catalog
This commit is contained in:
parent
98d75b3df9
commit
1b06432998
1 changed files with 10 additions and 1 deletions
|
@ -1,10 +1,18 @@
|
|||
import toml
|
||||
import sys
|
||||
|
||||
errors = []
|
||||
|
||||
catalog = toml.load(open('apps.toml'))
|
||||
|
||||
for app, infos in catalog.items():
|
||||
if "state" not in infos:
|
||||
errors.append(f"{app}: missing state info")
|
||||
|
||||
catalog = {app: infos for app, infos in catalog.items() if infos.get('state') == "working"}
|
||||
categories = toml.load(open('categories.toml')).keys()
|
||||
|
||||
|
||||
def check_apps():
|
||||
|
||||
for app, infos in catalog.items():
|
||||
|
@ -19,7 +27,8 @@ def check_apps():
|
|||
if category not in categories:
|
||||
yield f"{app}: category {category} is not defined in categories.toml"
|
||||
|
||||
errors = list(check_apps())
|
||||
|
||||
errors = errors + list(check_apps())
|
||||
|
||||
for error in errors:
|
||||
print(error)
|
||||
|
|
Loading…
Reference in a new issue