Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: test run locally #246

Closed
wants to merge 4 commits into from
Closed

test: test run locally #246

wants to merge 4 commits into from

Conversation

IlyasYOY
Copy link

@IlyasYOY IlyasYOY commented Jun 6, 2023

Hello! Thank you for this plugin! It's awesome!

I saw your comment here. So, I decided to give it a try.

I managed to run tests locally. They didn't hang.

But some of them were failing:

~/Projects/other/nvim-surrond-fork on  main ⌚ 21:47:42
$ make | grep -e "Success:" -e "Failed :"
Starting...Success:     0
Failed :        2
Success:        0
Failed :        3
Success:        0
Failed :        5
Success:        0
Failed :        8
Success:        1
Failed :        6
Success:        3
Failed :        16
Success:        9
Failed :        0

PS. I'm sure that this is not the solution, but hope this may help you find the solution.

@IlyasYOY
Copy link
Author

IlyasYOY commented Jun 6, 2023

In my plugins I look up to @folke's solutions. Good example is shown here.

@kylechui
Copy link
Owner

kylechui commented Jun 6, 2023

That's very interesting, maybe something's wrong with my configuration. I'll take a look later, thanks for the pointer!

@kylechui
Copy link
Owner

kylechui commented Jun 6, 2023

I checked out your branch and it also doesn't hang anymore, although now it is failing a bunch of test cases, which is less than ideal (and also strange, given that the core plugin doesn't utilize plenary at all). My tests work if I run them file-by-file, and they used to work on an older version of Neovim; I really don't know what happened to it. I do appreciate your work; hopefully I can understand your commit better at some point and isolate what the issue is.

@IlyasYOY
Copy link
Author

IlyasYOY commented Jun 7, 2023

I did fix the issue. The answer is always simple.

I forgot to add: require("nvim-surround").setup().

~/Projects/other/nvim-surrond-fork on  main! ⌚ 8:37:29
$ make | grep -e "Success:" -e "Failed :"
Starting...Success:     3
Failed :        0
Success:        2
Failed :        0
Success:        7
Failed :        0
Success:        8
Failed :        0
Success:        5
Failed :        0
Success:        19
Failed :        0
Success:        9
Failed :        0

@@ -35,10 +35,6 @@ jobs:
neovim: true
version: nightly

- name: Install plenary
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

- name: Run tests
run: nvim --headless --noplugin -c 'packadd plenary.nvim' -c "PlenaryBustedDirectory tests/ { minimal_init = 'tests/minimal_init.lua' }"
run: make test_lua
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reuse logic from Makefile so it's not duplicated.

PS. Maybe you think I should remove Makefile

@kylechui
Copy link
Owner

kylechui commented Aug 5, 2023

I'm not entirely sure what happened, but I updated plenary and it seems to be working for me again(?) Thanks for taking the time to submit the PR nonetheless (and sorry for the radio silence)!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants