test: add tests for all tools#76
Conversation
|
Please don't change the config unless it's really incompatible with the tool's latest stable... If you really need to, leave a note in the pr so that I can verify 🙏. |
|
Note that after this pr gets rebased onto |
472fe62 to
83fb825
Compare
|
done. r4r! @xiaoshihou514 |
|
For jar releases, I think there's sdk man that provides you with a single executable (dunno if that's through graal or a wrapper). |
|
For lint specs, it should actually use the configs instead of recreating the command again. |
|
In the workflow file, luarocks, vim setup etc was repeated many times. Could you investigate if there's a way to refactor this? |
6d888e5 to
e70d673
Compare
|
Blocked by comments above for now :) |
Problem: most formatters and linters in guard-collection had no test coverage. The csharpier binary was renamed in v1.0+ and ruff's -e flag was deprecated in favor of the check subcommand. Solution: add 42 test files covering every remaining tool, fix the csharpier and ruff definitions, extend the install script with gz/jar archive types, add 6 new CI jobs (dotnet, ruby, clojure, elixir, nix, swift), and expand existing jobs with newly tested tools.
Problem: the -X theirs merge strategy replaced the full test/all-tools CI config with the smaller fix/broken-configs version, losing install entries for dart, fish_indent, google-java-format, pg_format, tombi, typos, typstyle, xmllint, and zigfmt. Solution: restore binary.txt, ci.yaml, and install script from the pre-merge test/all-tools state which already had all entries.
Problem: every test job repeated the same 5 steps for neovim, lua, luarocks, busted/nlua, and guard.nvim clone — 175 lines of duplication across 15 jobs. Solution: extract into .github/actions/test-setup/action.yml and replace with a single `uses: ./.github/actions/test-setup` per job.
409ff5b to
564e321
Compare
Problem: rebase picked up old test versions that manually construct commands instead of using the config-driven helpers, defeating the purpose of testing the actual tool definitions. Solution: replace all 14 affected test files with the upstream/main versions that use run_lint/run_fmt. Add buf lint test using run_lint.
|
|
It's much cleaner now, I think it's almost ready :)
|
|
Just addressed both:
|
Problem: cljfmt required a dedicated CI job with Java, Clojure CLI, a hand-rolled wrapper script, and dep pre-warming. The binary job also had an inline apt-get install command inconsistent with other tool lists. Solution: switch cljfmt to the standalone GraalVM binary from GitHub releases, move its test into test/binary/, delete the test-clojure job, and extract the binary job's apt packages into binary-apt.txt.
|
sorry... fixed! accidentally applied commits to #81 Tests failing because of github actions being down (AGAIN!) |
.github/workflows/ci.yaml
Outdated
| - name: Install tools | ||
| run: | | ||
| mkdir -p $HOME/.local/bin | ||
| printf '#!/bin/sh\nclojure -Sdeps '"'"'{:deps {dev.weavejester/cljfmt {:mvn/version "0.13.0"}}}'"'"' -M -m cljfmt.main "$@"\n' > $HOME/.local/bin/cljfmt && chmod +x $HOME/.local/bin/cljfmt |
There was a problem hiding this comment.
What? Surely there's a better way. Maybe through clojure's pm lein?
.github/workflows/ci.yaml
Outdated
| printf "source 'https://rubygems.org'\ngem 'rubocop'\n" > /tmp/rubocop-test/Gemfile | ||
| cd /tmp/rubocop-test && bundle install |
There was a problem hiding this comment.
Same, probably a way to install it globally.
.github/workflows/ci.yaml
Outdated
| - name: Pre-warm cljfmt deps | ||
| run: | | ||
| export PATH="$HOME/.local/bin:$PATH" | ||
| echo "" | cljfmt fix - || true |
There was a problem hiding this comment.
This is such a hack... See above.
| @@ -0,0 +1,25 @@ | |||
| describe('cbfmt', function() | |||
There was a problem hiding this comment.
Why doesn't this use test.helper?
|
Can it be installed globally? (I know the config uses pm to launch it) |
Problem: rubocop formatter and linter definitions used `bundle exec rubocop`, requiring a Gemfile and bundle install in both tests and CI. Solution: invoke rubocop directly via `gem install rubocop`. Remove Gemfile setup from test and CI.
|
cbfmt uses anything else? if not, feel free to merge (once again, i don't have permission) |
|
yep |
Adds test coverage for ALL formatters and linters using the revamped architecture.
New tools tested in this PR: literally all remaining ones
update
Makefilewith new CI job categoriescloses #67 (6-7 reference)