Skip to content

New Test Workflow

New Test Workflow #21

Workflow file for this run

name: Test Action Workflow Documenter
on:
pull_request:
jobs:
test-functionality:
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Checkout
uses: actions/checkout@v4
- name: Run Test with Save to Artifact
if: always()
uses: ./
with:
save-to-artifact: "true"
save-to-branch: "false"
save-to-wiki: "false"
- name: Download Artifact
uses: actions/download-artifact@v4
with:
name: actions-documentation
- name: Verify Actions Documentation
shell: python
run: |
import os
import sys
print("Verifying Actions Documentation")
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
]
if not os.path.exists(file_workflows):
raise Exception(f"File {file_workflows} does not exist")
else:
print(f"Found {file_workflows}")
not_founds = []
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:
not_founds.append(find)
else:
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!")