diff --git a/.github/workflows/test-on-pr.yml b/.github/workflows/test-on-pr.yml index ca6ad7a..f0bc3fb 100644 --- a/.github/workflows/test-on-pr.yml +++ b/.github/workflows/test-on-pr.yml @@ -43,38 +43,37 @@ jobs: run: | import os import sys - + + print("#########################################") print("Verifying Actions Documentation") + print("#########################################") file_workflows = "WORKFLOWS.md" - find_build_and_review_pr = "Build and Review PR" - find_incrememt_version_on_merge = "Increment Version on Merge" - find_test_action_workflow_documenter = "Test Action Workflow Documenter" - finds = [ - find_build_and_review_pr, - find_incrememt_version_on_merge, - find_test_action_workflow_documenter + "Build and Review PR", + "Increment Version on Merge", + "Test Action Workflow Documenter" ] if not os.path.exists(file_workflows): - raise Exception(f"File {file_workflows} does not exist") + print(f"File '{file_workflows}' does not exist") + sys.exit(1) else: - print(f"Found {file_workflows}") + print(f"Found '{file_workflows}'") not_founds = [] - print(f"Look for specific strings in {file_workflows}") + print(f"Look for specific strings in '{file_workflows}'...") with open(file_workflows, "r") as reader: contents = reader.read() for find in finds: if find not in contents: + print(f"ERROR: Could not find '{find}' in '{file_workflows}'") not_founds.append(find) else: - print(f"Found {find} in {file_workflows}") + print(f"Found '{find}' in '{file_workflows}'") if len(not_founds) > 0: - print(f"Could not find the following workflows: {not_founds}") sys.exit(1) print("DONE!")