HiPhish / neotest-busted

Neotest adapter for running busted tests.
https://gitlab.com/HiPhish/neotest-busted
MIT License
10 stars 0 forks source link

Question: CI/pipeline support? #2

Closed linrongbin16 closed 9 months ago

linrongbin16 commented 9 months ago

hi, thanks to your work.

Except using this plugin as a unit test framework for Neovim lua plugin, I also need to integrate it into CI/Pipeline (such as GitHub Actions) of my Neovim plugin project.

Now I'm using vusted, it also wraps the busted (use 'nvim' as a lua interpreter) and helps running unit tests for Neovim lua project.

Does this plugin support CI/Pipeline?

linrongbin16 commented 9 months ago

oh, I think CI/Pipeline integration is more relate to Neotest itself, not this adapter project.

HiPhish commented 9 months ago

Neotest is for running tests inside Neovim, it does not concern itself with CI pipelines. If you want to run your tests inside a pipeline you can use the makefile in this repo as a starting point. For example, to run unit tests on the shell I execute ./test/busted --run unit. The file ./test/busted is a little shell script that calls luarocks to set up the PATH, and then calls busted. The busted binary then uses the settings from the .busted file to run the actual tests.

I don't know GitHub actions, so I cannot tell you how to do these steps in a pipeline, but if you can get tests running from the shell you should be able to work from there. Just don't be surprised if the tests in this repo fail, I had to make some changes to Neotest (https://github.com/nvim-neotest/neotest/pull/374) which haven't yet been upstreamed.

linrongbin16 commented 9 months ago

Thank you for reply!