Skip to content

test+ci: cross-platform wrapper tests + GitHub Actions matrix#3

Merged
WenyuChiou merged 1 commit into
masterfrom
claude/cross-platform-tests-and-ci
May 10, 2026
Merged

test+ci: cross-platform wrapper tests + GitHub Actions matrix#3
WenyuChiou merged 1 commit into
masterfrom
claude/cross-platform-tests-and-ci

Conversation

@WenyuChiou

Copy link
Copy Markdown
Owner

Summary

Mirror of WenyuChiou/codex-delegate#4 for this skill — make the wrapper test portable and add a CI matrix.

What changed

  • tests/test_wrappers.py:
    • _resolve_bash() picks git-bash explicitly on Windows (C:\Program Files\Git\bin\bash.exe and friends), avoiding WSL bash on PATH that emits UTF-16 banner output on hosts without an installed distro (e.g. GitHub Actions windows-latest).
    • to_bash_path() uses /c/ prefix on Windows (was /mnt/c/); POSIX paths pass through unchanged on Linux / macOS.
    • Bash test guarded with skipif if no bash available; PowerShell test guarded with skipif if powershell not on PATH (so it skips cleanly on Linux/macOS CI).
    • chmod +x only attempted on POSIX since Windows ignores Unix mode bits.
  • .github/workflows/test.yml: NEW. Runs pytest across {ubuntu-latest, windows-latest} x {py 3.10, 3.11, 3.12} on push and PR to master. shell: bash so the same step works on both runners.

Test plan

  • Local Windows + Git-for-Windows: python -m pytest tests/ -v → 2 passed.
  • CI matrix all 6 cells green (codex-delegate#4 already validated this same approach passes on the same runner matrix).

🤖 Generated with Claude Code

Symmetric to the codex-delegate change in
WenyuChiou/codex-delegate#4. Make the wrapper
test portable across Linux / macOS / Windows (with Git for Windows)
and add a GitHub Actions matrix.

Test changes (tests/test_wrappers.py):
- _resolve_bash() picks git-bash explicitly on Windows (avoiding WSL
  bash, which on a host without an installed distro emits UTF-16 banner
  output that contaminates subprocess pipes); shutil.which('bash') on
  Linux / macOS.
- to_bash_path() uses /c/ prefix on Windows (was /mnt/c/); POSIX paths
  pass through unchanged on Linux / macOS.
- Bash test guarded with skipif if no bash available; PowerShell test
  guarded with skipif if powershell not on PATH (so it skips cleanly
  on Linux/macOS CI).
- chmod +x only attempted on POSIX since Windows ignores Unix mode
  bits.

CI (.github/workflows/test.yml): NEW. Runs pytest across
{ubuntu-latest, windows-latest} x {py 3.10, 3.11, 3.12} on push and
PR to master. shell: bash so the same step works on both runners
(windows-latest provides git-bash via Git for Windows pre-installed
in the runner image).

Tested:
- Local Windows + Git-for-Windows: 2 passed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@WenyuChiou WenyuChiou merged commit 3f76ea2 into master May 10, 2026
6 checks passed
@WenyuChiou WenyuChiou deleted the claude/cross-platform-tests-and-ci branch May 10, 2026 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant