test+ci: cross-platform wrapper tests + GitHub Actions matrix#3
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.exeand 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.skipifif no bash available; PowerShell test guarded withskipififpowershellnot on PATH (so it skips cleanly on Linux/macOS CI).chmod +xonly 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: bashso the same step works on both runners.Test plan
python -m pytest tests/ -v→ 2 passed.🤖 Generated with Claude Code