Skip to content

[quality] CI only runs argo lint — Python test files have no syntax/import validation #173

@kubestellar-hive

Description

@kubestellar-hive

Finding

.github/workflows/lint.yaml only runs argo lint --offline on workflow YAML files. The repository contains 30+ Python test files (tests/**/*.py) with no CI validation of:

  • Python syntax (a syntax error in any test file is invisible until it runs on hardware)
  • Import correctness (a bad import breaks test collection silently)
  • pytest collection (discover broken fixtures, missing conftest, etc.)

The testsuite sibling repo has a pr-validate.yml workflow that runs ruff check and py_compile on all test files — a good reference.

Recommendation

Add a validate.yml workflow that runs on every PR:

- name: Python syntax check
  run: python -m py_compile $(find tests/ -name '*.py' | tr '\n' ' ')

- name: Python lint (ruff)
  run: ruff check tests/ --select E,F --ignore E501

- name: pytest collection dry-run
  run: pytest --collect-only tests/ -q

The collection dry-run is the most valuable step: it catches missing dependencies, broken imports, and conftest errors without running any actual tests against live infrastructure.

Priority

  • Impact: medium — broken tests go unnoticed until CI hardware is available
  • Effort: low — copy/adapt the pattern from testsuite's pr-validate.yml

Filed by quality agent (hold-gated mode)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions