kylechui / nvim-surround

Add/change/delete surrounding delimiter pairs with ease. Written with :heart: in Lua.
MIT License
3.18k stars 62 forks source link

ci: enable GitHub actions for stylua, luacheck and tests #93

Closed smjonas closed 2 years ago

smjonas commented 2 years ago

You can see an example CI run here: https://github.com/smjonas/nvim-surround/pull/1

Currently the tests are failing (locally as well), but that should be fixed separately.

kylechui commented 2 years ago

Just a quick question before I merge, is vusted the same testing software as what plenary uses? Because I feel like the tests should be passing if it's just running surround_spec.lua.

smjonas commented 2 years ago

Afaik vusted and plenary are both wrappers around busted (plenary seems to include a custom busted implementation). I can try to figure out why the tests are failing. Btw, I have no experience with plenary but I find vusted very easy to use as a simple luarocks package.

kylechui commented 2 years ago

I see, thanks for the explanation. I think switching to vusted would be alright, but sticking with plenary is probably preferable(?). For me plenary was my first experience with testing in general, and I was following a video guide on how to use it; I could look into vusted as a new testing framework, but I think the tests should be be available locally as well.

Edit: I would need to learn how to use vusted locally, is what I was trying to say

NoahTheDuke commented 2 years ago

Small thing to note: the neovim/lua community has really adopted plenary, so it might be worth sticking just to keep consistent with the community.

smjonas commented 2 years ago

It should be as simple as luarocks install vusted, then vusted tests. I have no real preference, but someone else would have to help with setting up GitHub actions for plenary then. Unless I decide to watch some tutorial on plenary later :)

Small thing to note: the neovim/lua community has really adopted plenary, so it might be worth sticking just to keep consistent with the community.

Sure, but I mean this will only be used for GitHub actions. You can still use plenary locally if you prefer it.

kylechui commented 2 years ago

Since IMO we're in no real rush to have GitHub automated tests, I think we can just leave this PR here for now while you try to figure out using plenary with GitHub Actions. I don't want to sound too entitled to your time though, and thank you so much for working on this to begin with :sparkling_heart:

smjonas commented 2 years ago

I managed to get tests working with plenary :) Though the tests are still failing with the exact same error as with vusted :D @kylechui

smjonas commented 2 years ago

I have fixed the tests, should be good to merge now.

kylechui commented 2 years ago

Thank you so much for the help!