Add pytest and Python linting (ruff) to CI (#1637)

* feat: add GitHub Actions workflow for testing and linting Python code

* fix: resolve ruff lint errors in specify_cli

- Remove extraneous f-string prefixes (F541)
- Split multi-statement lines (E701, E702)
- Remove unused variable assignments (F841)
- Remove ruff format check from CI workflow (format-only PR to follow)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* fix: strip ANSI codes in ai-skills help text test

The Rich/Typer CLI injects ANSI escape codes into option names in
--help output, causing plain string matching to fail.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
Manfred Riem
2026-02-19 16:21:58 -06:00
committed by GitHub
parent 0f7d04b12b
commit 24d76b5d92
3 changed files with 83 additions and 27 deletions

View File

@@ -10,6 +10,7 @@ Tests cover:
- CLI validation: --ai-skills requires --ai
"""
import re
import pytest
import tempfile
import shutil
@@ -626,5 +627,6 @@ class TestCliValidation:
runner = CliRunner()
result = runner.invoke(app, ["init", "--help"])
assert "--ai-skills" in result.output
assert "agent skills" in result.output.lower()
plain = re.sub(r'\x1b\[[0-9;]*m', '', result.output)
assert "--ai-skills" in plain
assert "agent skills" in plain.lower()