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:
@@ -13,10 +13,33 @@ on:
|
||||
- "functions/**"
|
||||
- "conf.d/**"
|
||||
- "config.fish"
|
||||
- "completions/**"
|
||||
- "integrations/**"
|
||||
- "tests/**"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: racknerd-mini
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
token: ${{ secrets.GITEA_TOKEN }}
|
||||
|
||||
- name: Install fish
|
||||
run: |
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y software-properties-common
|
||||
sudo add-apt-repository -y ppa:fish-shell/release-4
|
||||
sudo apt-get update -qq
|
||||
sudo apt-get install -y fish
|
||||
|
||||
- name: Run fish config tests
|
||||
run: fish tests/run-tests.fish
|
||||
|
||||
build-docs:
|
||||
needs: test
|
||||
runs-on: racknerd-mini
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
||||
Reference in New Issue
Block a user