Commit 5f924a0
authored
ref(test)!: revamp test infra (#73)
* feat(linter): add zsh syntax checker
* fix(ci): add luarocks bin to PATH
* fix: revert ci change
* feat(linter): add cpplint C++ linter
* feat(linter): add cpplint C++ linter
* ci: rewrite workflow with parallel jobs and modern actions
replaces monolithic test job with parallel jobs grouped by package manager.
each job installs only what it needs and runs its specific tests.
- uses nvim-neorocks/nvim-busted-action for neovim + vusted setup
- updates all actions to latest versions (checkout@v4, setup-python@v5, etc)
- adds coverage job to warn when tools are missing tests
- removes setup.sh and env.sh (no longer needed)
* test: update expectations for guard.nvim diagnostic format changes
- Strip _extmark_id in linter helper (internal nvim field)
- Update tests to use separate code field instead of message suffix
- Update end_col values to match guard.nvim behavior
- Update rustfmt expected output for new import formatting style
- Update buf formatter expected output (compact style)
- Add missing W292 diagnostic to flake8 test
- Remove buf linter test (requires buf.yaml config)
* refactor(test): reorganize tests by package manager
Move tests from test/{formatter,linter}/ to test/{pip,npm,go,rust,lua,binary,clang,haskell}/
to allow CI to use glob patterns (busted test/pip/*_spec.lua) instead of
listing each test file explicitly.
This means adding new tools no longer requires workflow changes.
* fix(test): update checkmake expected output for new phonydeclared rule
* fix(ci): run clang tests separately to avoid state pollution
Run each clang test file in its own busted process to prevent
test state from leaking between clang-format and clang-tidy tests.
* fix(test): revert checkmake linter, fix test order
Revert checkmake linter to original fn-based approach.
Update test to match actual diagnostic output order.
* fix(test): restore swiftformat test with proper naming
Original test was named swiftformat.lua (missing _spec suffix)
so busted never ran it. Restored with correct naming and
added swiftformat installation to CI.
* fix(ci): rename swiftformat binary after extraction
* fix(test): restore buf linter test and fix formatter expectation
* fix(buf): use fn approach for linter, fname for formatter
* Revert "fix(buf): use fn approach for linter, fname for formatter"
This reverts commit 51d94b1.
* fix(buf): simpler test input, formatter uses fname not stdin
* Revert "fix(buf): simpler test input, formatter uses fname not stdin"
This reverts commit 3b5c3af.
* fix(ci): remove buf tests (fix in separate PR)
* fix: move cpplint to pip, zsh to binary
* refactor(test)!: replace async test infra with synchronous execution
Old test helpers used guard.nvim's async pipeline with a hardcoded
vim.wait(3000), causing flaky CI failures. New approach runs tools
directly via vim.system():wait() — zero timing issues, tests real
tool output, no dependency on guard.nvim's format/filetype modules.
This commit strips all existing tests and CI jobs down to a single
MVP (black formatter + flake8 linter) to validate the approach.
Remaining tools will be re-added in a follow-up PR.
BREAKING CHANGE: test helpers renamed from fmt_helper/lint_helper
to a unified test/helper.lua with run_fmt(), run_lint(), get_linter()1 parent e9667a3 commit 5f924a0
41 files changed
Lines changed: 173 additions & 1096 deletions
File tree
- .github/workflows
- test
- formatter
- linter
- pip
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
5 | 7 | | |
6 | 8 | | |
7 | 9 | | |
8 | 10 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 11 | + | |
16 | 12 | | |
17 | 13 | | |
18 | 14 | | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | 15 | | |
23 | | - | |
24 | 16 | | |
25 | 17 | | |
26 | 18 | | |
27 | 19 | | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | 20 | | |
34 | 21 | | |
35 | 22 | | |
36 | 23 | | |
37 | 24 | | |
38 | | - | |
| 25 | + | |
39 | 26 | | |
40 | 27 | | |
41 | | - | |
| 28 | + | |
42 | 29 | | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
59 | 33 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
75 | 41 | | |
76 | 42 | | |
77 | | - | |
78 | 43 | | |
79 | 44 | | |
80 | | - | |
81 | | - | |
82 | | - | |
83 | | - | |
84 | | - | |
| 45 | + | |
85 | 46 | | |
86 | | - | |
87 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
88 | 59 | | |
89 | 60 | | |
90 | | - | |
91 | | - | |
| 61 | + | |
| 62 | + | |
92 | 63 | | |
93 | | - | |
94 | | - | |
95 | | - | |
96 | | - | |
97 | | - | |
98 | | - | |
99 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
100 | 67 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
| 68 | + | |
105 | 69 | | |
106 | 70 | | |
107 | 71 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
0 commit comments