You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While quick to set up, inline Python code in workflow files can become difficult to maintain, test, debug, read, and lint properly.
Proposed Changes
Extract Inline Python Logic: Move the inline Python code snippets out of .github/workflows/orchestrate-config-tests.yml into standalone Python script file(s) under a dedicated folder (e.g., .github/scripts/ or scripts/).
Create a Dedicated Composite Action (Optional/Recommended): If the orchestration steps or Python execution logic are complex or reusable, encapsulate them into a local composite GitHub Action (e.g., .github/actions/orchestrate-tests/action.yml) or a separate clean action step.
Simplify the Workflow File: Update orchestrate-config-tests.yml to call the newly created script or action directly (e.g., python .github/scripts/orchestrate.py or calling the custom action).
Benefits
Improved Readability & Maintainability: YAML and Python syntax are decoupled, making the workflow cleaner.
Better Linting & Testing: Extracted Python files can be linted (with flake8, ruff, or black) and unit-tested more easily.
Enhanced Debugging: Standard error traces and line numbers from Python scripts will be clearer in CI logs.
Checklist
Identify all inline Python snippets within orchestrate-config-tests.yml.
Move the Python logic into a standalone script or modular action structure.
Update the workflow to invoke the new script/action.
Test the workflow via a PR/branch build to ensure identical functionality.
Activity