Skip to content

Commit

Permalink
Ensure we have one scenario per automation file
Browse files Browse the repository at this point in the history
This is in addition to a coming PR, #375. This change here is allowing
to ensure we follow those practices:
- only one scenario per file
- filename matches "scenario_name.yaml" pattern
  • Loading branch information
cjeanner committed Sep 4, 2024
1 parent e14dcdb commit 79de818
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .ci/automation-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# We are using yamale to validate files
# https://github.com/23andMe/Yamale
---
vas: map(include('_architecture'), key=str())
vas: map(include('_architecture'), key=str(), min=1, max=1)

---
# Define various nested types
Expand Down
2 changes: 2 additions & 0 deletions .ci/validate-schema-paths.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ def __run_file(self, f):
content = yaml.safe_load(fh)
for scenario in content['vas']:
print(f' Checking scenario: {scenario}')
assert (rel.name == f'{scenario}.yaml'), \
f'!! {rel.name} does not match {scenario}.yaml'
self.__validate(content['vas'][scenario])

def __validate(self, scenario):
Expand Down

0 comments on commit 79de818

Please sign in to comment.