-
Notifications
You must be signed in to change notification settings - Fork 23
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
WIP: proof-of-concept busted test setup #134
base: main
Are you sure you want to change the base?
Conversation
This PR takes some baby steps towards solving andrewferrier#107 Short explanation of the commit =============================== To get started, - install luarocks - run `luarocks --local install nlua` to install https://github.com/mfussenegger/nlua which is needed for running busted locally - run `make init` to install the necessary dependencies - run `eval $(luarocks path --no-bin --lua-version 5.1)` (seems to be required on osx) to set up the luarocks path, which is needed to run the tests locally - run `make test` to run the tests - optionally, use a file watcher like https://github.com/watchexec/watchexec to automatically run the tests when files change Current status ============== - some of the tests are failing, but the setup is working - not sure about ci, but it's the same setup as in https://github.com/mikavilpas/yazi.nvim and that works, so it can be incrementally copied over when in doubt - I meant to finish this in one go, but it proved more challenging than I originally thought so I'm sending this as a WIP Recommendations =============== - I might have missed some crucial setup steps, so let me know if something doesn't make sense - I think it's possible to implement some things diferently, so if you have some preferences, we can simplify the setup (or complicate it 😄) https://github.com/nvim-neorocks/nvim-busted-action
Looks like CI is also able to run these tests - although right now the same failure is also reflected there. 👍🏻 |
.PHONY: init test | ||
|
||
init: | ||
luarocks init --no-gitignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would be great to add the luarocks --local install nlua
here also. And shouldn't the busted install be local also?
Sounds like a good start. I can't get this to run though, when I run |
OK, with some more changes to the init:
luarocks --lua-version 5.1 init --no-gitignore
luarocks --lua-version 5.1 install --local busted 2.2.0-1
luarocks --lua-version 5.1 install --local plenary.nvim
luarocks --lua-version 5.1 install --local nlua |
I'm finding the first test fails, unfortunately, it looks like probably some filetype detection issue:
Worse, the tests quit out directly afterward and don't run the first of the test suite. |
Yeah, I get the same thing. It looks like on the main branch the fileconfig is the following:
But on this branch, fileconfig is
|
This PR takes some baby steps towards solving
#107
Short explanation of the commit
To get started,
luarocks --local install nlua
to install https://github.com/mfussenegger/nlua which is needed for running busted locallymake init
to install the necessary dependencieseval $(luarocks path --no-bin --lua-version 5.1)
(seems to be required on osx) to set up the luarocks path, which is needed to run the tests locallymake test
to run the testsCurrent status
Recommendations
https://github.com/nvim-neorocks/nvim-busted-action
(2 tests pass and one fails for me)