Skip to content

Split GitHub workflow contract tests below the Pylint module limit #2212

Description

@codeforester

Goal

Split the GitHub workflow contract tests into focused modules so the Pylint module-size gate passes without weakening the limit.

Background

tests/test_github_workflows.py is 1002 lines on main, which fails Pylint's default too-many-lines limit of 1000. The largest cohesive section is the issue-branch-policy contract and scenario suite. This is follow-up maintenance after the recent workflow-hardening changes; it is independent of the merged documentation change in #2206.

Scope

  • Move the issue-branch-policy workflow contract and scenario tests into a focused test module.
  • Keep shared process/YAML helpers reusable and preserve test behavior.
  • Update contract runners, lightweight CI commands, documentation, and hardening-test references that name the existing module.
  • Keep the general workflow contract tests in tests/test_github_workflows.py.

Acceptance Criteria

  • No module checked by Pylint exceeds the configured/default 1000-line limit.
  • The moved issue-branch-policy tests run and retain their existing assertions.
  • Contract runners and lightweight CI invoke the complete workflow contract coverage.
  • The contract registry and enforcement references remain accurate.
  • No Pylint threshold increase or blanket too-many-lines suppression is introduced.

Validation

  • python -m pytest tests/test_github_workflows.py tests/test_issue_branch_policy_workflow.py -q
  • bash tests/contracts/run.sh or the focused contract checks it composes.
  • git diff --check
  • Pylint across the supported Python matrix.

Non-goals

  • Do not change workflow behavior or issue-branch-policy semantics.
  • Do not change the Pylint policy to accommodate this file.
  • Do not combine unrelated workflow or documentation changes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

ciContinuous integration, tests, automation, or release workflows

Type

No type

Projects

  • Status
    Done

Relationships

None yet

Development

No branches or pull requests

Issue actions