Skip to content

Commit

Permalink
exclude soroban_version from listed detectors against dir detectors
Browse files Browse the repository at this point in the history
  • Loading branch information
tenuki committed Feb 26, 2024
1 parent 9aef26b commit 7c17727
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/check-ci-detectors-to-test.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,13 @@ def is_special_directory(directory):

with open(args.gh_workflow_path, "r") as f:
workflow = yaml.safe_load(f)
detectors_to_test = workflow["jobs"]["test"]["strategy"]["matrix"]["test"]
detectors_to_test = set()workflow["jobs"]["test"]["strategy"]["matrix"]["test"])

detectors = [ f.name for f in os.scandir(args.detectors_path) if f.is_dir() and not is_special_directory(f.name) ]
detectors.sort()
detectors = set(f.name for f in os.scandir(args.detectors_path) if f.is_dir() and not is_special_directory(f.name))
# detectors.sort()

if (detectors != detectors_to_test):
sym_diff = detectors ^ detectors_to_test
if len(sym_diff)!=0 and sym_diff!=set(['soroban-version']):
print("Detectors to test in the workflow are not the same as the detectors in the detectors folder.")
print("Detectors to test: ", detectors_to_test)
print("Detectors in the folder: ", detectors)
Expand Down

0 comments on commit 7c17727

Please sign in to comment.