Skip to content

Cleanup orchestrate-config-test.yml workflow file #14

Open

Description

@cedricdcc

Overview

The workflow file for orchestrating configuration tests—[/.github/workflows/orchestrate-config-tests.yml](https://github.com/vliz-be-opsci/grmp-demo/blob/main/.github/workflows/orchestrate-config-tests.yml)—currently contains inline Python scripts embedded directly within GitHub Actions YAML steps (e.g., using python -c "..." or multiline inline python strings).

While quick to set up, inline Python code in workflow files can become difficult to maintain, test, debug, read, and lint properly.


Proposed Changes

  1. 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/).
  2. 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.
  3. 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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    • Status
      Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions