Open jetjinser opened 1 month ago
Hi, thanks for this work. I think the way to proceed is to write a github action that checks out the golden-forest
repository on a push, rather than tracking these files:
https://github.com/actions/checkout
https://github.com/actions/checkout?tab=readme-ov-file#checkout-multiple-repos-side-by-side
My original purpose of putting these trees locally was to be able to test them locally. However, it also makes sense to test in CI, it's more convenient and doesn't have to deal with git subtree
, I think I'll do it!
It's just that I'd still like to be able to make local testing possible, any ideas?
By the way, the reason I created a separate golden-forest
is to ensure that all trees can be successfully constructed by the forester.
I think it is a good idea to have a separate forest for tests. I can make use of it in other projects as long as the example repo is up to date.
It's just that I'd still like to be able to make local testing possible, any ideas?
How about we add a script to this repository that clones the repo and runs the tests? Then we can still run the tests natively, and maybe even reuse that script in CI.
Sounds great!
You reminded me that this is what tree-sitter does, they have a script/fetch-fixtures
to do it.
Hi, I just updated it, please take a look! @kentookura :)
Overall this looks nice. I would like fix all errors that are reported by the tests before we merge this though, which will require us to update the grammar. If you'd like, you can open another PR with your changes to the grammar.
I created a new forest trees to try my best to use all the syntax, and then I pulled Jon's public trees. I use git subtree to manage these trees. Then I wrote a script to generate tree-sitter tests from them.
Currently the script doesn't work due to a tree-sitter cli bug and I created a PR (https://github.com/tree-sitter/tree-sitter/pull/3590) for it.
I don't know how about this way of testing, this is just a POC, please give your suggestions.