Fix CI test reliability and add tmux shell plugin tests (#1014)#1027
Open
GauravS11112003 wants to merge 4 commits into
Open
Fix CI test reliability and add tmux shell plugin tests (#1014)#1027GauravS11112003 wants to merge 4 commits into
GauravS11112003 wants to merge 4 commits into
Conversation
Introduce tests/shell with bash/zsh/fish coverage and deterministic fixtures; wire a shell-tests workflow gated on shell/ and tests/shell/. Closes denisidoroGH-1014. Covers denisidoroGH-1010-style multiline snippet behavior.
Use cargo-installed tealdeer in CI and enable client.tealdeer in tests/config; prime tldr cache. Improve fish tmux launcher quoting, relax pane sentinel matching, extend multiline timeouts, and silence non-tty stty noise in integration tests.
Match tmux prompt lines without requiring a trailing space; force screen-capable TERM for plugin sessions. Prime tealdeer with tldr --update before the integration test.
Gate stty sane on stdin being a tty to avoid /dev/tty redirects in non-interactive CI. Expect docker in tldr best-match output without requiring contiguous \"docker ps\" after page layout churn.
Author
|
@denisidoro just a follow-up on this PR. |
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
This PR adds a dedicated tmux-driven test suite for the bash, zsh, and fish shell widgets under
shell/, so plugin behaviour is exercised inside real interactive shells instead of only checking thatnavi widget <shell>prints something containingnavi.It also hardens CI around third-party
tldrusage and non-interactive test runs (no TTY), so the main./tests/runjob stays reliable on GitHub Actions.What’s included
tests/shell/run— drives each shell in tmux, sources the matching plugin, sends Ctrl+G, and asserts on sentinel output from tiny fixtures intests/shell/cheats/.tests/shell/lib.bash— tmux helpers (session start/stop,send-keys, pane capture, wait-for regex).tests/shell/rc/so plugins load in a predictable interactive session..github/workflows/shell-tests.yml— path-filtered workflow (only whenshell/**,tests/shell/**, or that workflow file changes) so unrelated PRs do not pay for zsh/fish/tmux setup.CI / integration test notes
tldr: CI installs tealdeer and setsclient.tealdeer: truefor the test config; the cache is primed withtldr --updatebefore the third-party test.stty: Integration wrapper only runsstty sanewhen stdin is a TTY, so headless CI does not open/dev/ttyand fail underset -e.TERMfor sessions on runners that default toTERM=dumb.Follow-ups (out of scope here)
fzf(e.g. tide/starship) as a dedicated scenario.Closes #1014.
Refs #1010.