Commit graph

24 commits

Author SHA1 Message Date
Christian Clason
53dccb3a77 feat(tests)!: new infrastructure based on makefile
Problem: Not easy to run all checks and tests locally. Redundant CI
workflows.

Solution: Separate CI into two workflows:
 * lint: Lua files (stylua, luals), query files (valid captures,
   predicates, directives using tsqueryls), docs
   (SUPPORTED_LANGUAGES.md) -- does not need parser installation
 * tests: parsers (ABI compatibility), query files (tsqueryls on
   Linux/macOS; nvim on Windows), highlight and indent tests (separated
   for better readability) -- needs parser installation (but only once)

Switch to https://github.com/nvim-treesitter/highlight-assertions fork
with ABI 15 support.

Run all tests (on Linux and macOS) through `make` (`formatlua`,
`checklua`, `lintquery`, `formatquery`, `checkquery`, `docs`, `tests`),
which downloads and caches all necessary dependencies.

Remove `update-readme` workflow (replaced by lint job on PRs).
2025-05-12 18:43:41 +02:00
Christian Clason
c5a8c9d01a ci(tests): add optional workflow for generating grammars
run on PR by adding label `ci:generate` or manually
2025-05-12 18:43:40 +02:00
Christian Clason
5a38df5627 feat(install)!: generate from json instead of requiring node
Problem: Many parsers require node/npm to evaluate the `grammar.js`
before being able to generate a parser from it.

Solution: Generate from `grammar.json` instead, which is fully resolved.
Drops `node` and `npm` as (optional) requirements for nvim-treesitter.

Note that this requires parsers to commit the generated json iff the
grammar requires evaluation (which is currently the case for all tracked
languages).
2025-05-12 18:43:40 +02:00
Christian Clason
692b051b09 feat!: drop modules, general refactor and cleanup 2025-05-12 18:43:40 +02:00
Christian Clason
2eb50352c0 ci: bump stylua-action to v4 2024-08-27 14:29:54 +02:00
Christian Clason
d3acd105bd ci(lint): make sure query parser is installed from this repo
Problem: format-queries.lua in CI uses the bundled query parser from
Neovim, meaning breaking changes are not reflected in tests.

Solution: Install nvim-treesitter in the lint workflow and use it to
install the query parser.
2024-05-26 00:24:03 +02:00
Christian Clason
4b27f87fef fix(scripts): format-queries defaults to cwd 2024-02-20 09:59:02 +09:00
Christian Clason
b5736698be ci: use token for automated PRs
* Use a Github App token to allow CI to run automatically
(Following
https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens)

* Enable automerge

* make lint workflow only run once on PRs to master
2024-01-28 16:15:57 +01:00
Pham Huy Hoang
79975d6557 ci: add query lint job 2024-01-19 16:58:37 +01:00
Christian Clason
9288d9b505 ci: bump actions to latest 2024-01-05 12:54:30 +01:00
Christian Clason
330da0ff07 ci: bump actions to latest 2023-07-11 08:14:21 +02:00
dundargoc
83e2e22d9e ci: remove ready_for_review type
It's only needed if a job is disabled for drafts. Otherwise it will just
run the same workflow twice.
2023-02-23 21:03:02 +01:00
Kiyoon Kim
80e41f22ce prettier formatting yml and md 2023-02-16 01:48:37 -08:00
dundargoc
225846c5e8 ci: bump stylua action to v2 2022-12-17 18:55:50 +01:00
dundargoc
f2a5524add ci: bump action versions 2022-12-17 12:57:24 +01:00
Christian Clason
a52cbe0951 ci(lint): update stylua-actions 2022-09-23 09:14:05 +02:00
Dundar Göc
d7eab3a5a9 ci: use apt-get instead of apt to avoid warnings from apt 2022-02-06 13:58:41 +01:00
Dundar Göc
322c7995b2 ci: remove unnecessary apt calls 2022-02-06 13:58:41 +01:00
dundargoc
3041e32701
ci: mark automated PRs as draft (#2413)
The required checks can be initiated by marking the PR as ready for
review.
2022-02-01 09:08:45 +01:00
Christian Clason
ab29010c5b
ci: only fix major version of vulnerable action (#2411)
also bump checkout to v2 everywhere
2022-01-30 19:03:07 +01:00
Santos Gallegos
437e41e9fc Luacheck: use config file to exclude files 2021-07-05 12:39:32 +02:00
Santos Gallegos
be8f656087
Use stylua for autoformat code (#1480) 2021-07-04 21:12:17 +00:00
Stephan Seitz
81182975ee fix(CI): Run style check as sudo 2020-08-21 18:52:18 +02:00
Thomas Vigouroux
0e041bd343 ci: use GH Actions istead of Travis CI 2020-07-09 22:34:34 +02:00