test(ci): add fish config test suite and gate docs build on it

Adds tests/run-tests.fish (syntax lint over every .fish file, plus a
sandboxed interactive load) and tests/functional.fish (10 checks
covering XDG/PATH/CDPATH setup, key bindings, abbreviations, core
functions, exit rewiring, and the opinionated-component registry).

The sandbox copies config-relevant files into a scratch HOME/XDG tree
rather than symlinking the checkout, since this repo also serves as a
live ~/.config/fish and a symlink would let universal-variable writes
leak into the real fish_variables file.

Wires the suite into build-docs.yml as a `test` job that `build-docs`
now depends on, so a broken config can no longer get published to the
docs site. Documents the workflow in the README's new Testing section.
This commit is contained in:
2026-08-20 01:03:40 -04:00
parent 451097d384
commit 642c981e4b
4 changed files with 198 additions and 0 deletions
+11
View File
@@ -15,6 +15,7 @@ abbreviation system for keyboard-driven workflows.
- [Installation](#installation)
- [Personalization](#personalization)
- [Minimal Mode](#minimal-mode)
- [Testing](#testing)
- [Attribution](#attribution)
- [License](#license)
@@ -330,6 +331,16 @@ for the full sub-category list per category.
---
## Testing
```fish
fish tests/run-tests.fish
```
Runs before every push (and gates the [documentation build](.github/workflows/build-docs.yml) in CI, so a broken config can't get published): syntax-lints every `.fish` file, then loads the config in an isolated `HOME`/XDG sandbox — never this checkout itself, since it doubles as a real `~/.config/fish` — and runs functional checks against foundational behavior (XDG/PATH/CDPATH setup, key bindings, abbreviations, core functions, the opinionated-component registry, and more).
---
## Attribution
The core of the [Zoxide integration](https://fish.rootiest.fyi/02-path-setup/) in this repository was originally adapted from the [icezyclon/zoxide.fish](https://github.com/icezyclon/zoxide.fish) plugin (MIT Licensed) and has since been heavily customized for performance and Fish 4.x compatibility.