You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+69Lines changed: 69 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,6 +30,75 @@ Plugin-specific mappings live in `lua/plugins/configs/`. LSP mappings are define
30
30
31
31
<br>
32
32
33
+
# Tests
34
+
35
+
The `test/` directory contains a headless CI suite that runs inside the devcontainer image. All steps are orchestrated by `test/ci_validate.sh`.
36
+
37
+
## Test scripts
38
+
39
+
- **`test/ci_install_plugins.lua`** — boots lazy.nvim in headless mode and runs `lazy.sync()`. Fails with exit code 1 if lazy.nvim is not loadable or the sync step errors.
40
+
41
+
- **`test/ci_validate_lsp.lua`** — verifies the native LSP layer loads without errors:
42
+
- `require("lsp")` succeeds (global capabilities set via `vim.lsp.config('*', {...})`)
43
+
- `vim.lsp.config["*"]` contains the expected capabilities table
44
+
- Spot-checks that each `after/lsp/<name>.lua` file was sourced by asserting `vim.lsp.config[name].settings` is present for: `gopls`, `lua_ls`, `rust_analyzer`, `yamlls`, `helm_ls`, `eslint`, `ansiblels`, `jsonnet_ls`
45
+
46
+
- **`test/install_parsers.lua`** — installs all treesitter parsers via `TSInstall!` in headless mode, then polls until all `.so` files appear on disk (timeout: 5 min). Fails if any parser times out.
- **`test/validate_treesitter.lua`** — loads each parser against a real source fixture and calls `parser:parse()`. Fails if any parser cannot be loaded or produces no parse trees.
The GitHub Actions workflow (`.github/workflows/validate.yml`) builds the devcontainer image and mounts the repo into it. You can reproduce this locally in two ways.
70
+
71
+
## Option 1 — Direct Docker (recommended for this config)
72
+
73
+
The most reliable local approach, since the workflow uses Docker-in-Docker internally:
[act](https://github.com/nektos/act) runs GitHub Actions workflows locally using Docker. Install it via your package manager, then:
92
+
93
+
```bash
94
+
# Run the validate job (mirrors what GitHub runs on push/PR)
95
+
act push -j validate
96
+
```
97
+
98
+
> **Note:** Because the workflow itself uses `docker/build-push-action`, `act` requires Docker-in-Docker. If the build step fails, fall back to Option 1 above.
0 commit comments