1
0
Fork 0
mirror of https://github.com/MillironX/nf-configs.git synced 2024-11-22 00:26:03 +00:00

fix cchecker

This commit is contained in:
ggabernet 2021-07-03 15:09:43 +02:00
parent 6475671c38
commit 2a69b90be6

View file

@ -58,16 +58,16 @@ def check_config(Config, Github):
wf = yaml.safe_load(ghfile) wf = yaml.safe_load(ghfile)
profile_list = wf["profile_test"]["strategy"]["matrix"]["profile"] profile_list = wf["profile_test"]["strategy"]["matrix"]["profile"]
except Exception as e: except Exception as e:
return {"failed": ["Could not parse yaml file: {}, {}".format(Github, e)]} print("Could not parse yaml file: {}, {}".format(Github, e))
sys.exit(1)
# Add profiles to test # Add profiles to test
for profile in profile_list: for profile in profile_list:
tests.add(profile.strip()) tests.add(profile.strip())
###Check if sets are equal ###Check if sets are equal
if tests == config_profiles: try:
sys.exit(0) assert tests == config_profiles
else: except (AssertionError):
#Maybe report what is missing here too
print("Tests don't seem to test these profiles properly. Please check whether you added the profile to the Github Actions testing YAML.\n") print("Tests don't seem to test these profiles properly. Please check whether you added the profile to the Github Actions testing YAML.\n")
print(config_profiles.symmetric_difference(tests)) print(config_profiles.symmetric_difference(tests))
sys.exit(1) sys.exit(1)