config: testing in a docker container #256
Replies: 2 comments 5 replies
-
Hi! The neotest-golang adapter does not support this (today). Right off the bat, I am guessing that the following is needed to support it;
But there might be better ways that I'm not aware of. Have you looked at how other Neotest adapters are solving this problem? Quick Google search for inspiration:
This discussion talks mostly about how difficult it would be to support this in Neotest itself, but is still interesting to include when thinking about how this could be solved for neotest-golang. |
Beta Was this translation helpful? Give feedback.
-
@balpert89 have you tried using a dev-container approach? I haven't tried this myself, but I guess this means running Neovim from inside the container. Meaning, you'd have to make sure to install Neovim there first + any linters, LSPs, formatters etc. Here's a pretty good walkthrough: https://cadu.dev/running-neovim-on-devcontainers/ |
Beta Was this translation helpful? Give feedback.
-
Did you check docs and existing issues?
Neovim version (nvim -v)
0.10 or 0.11-nightly
Operating system/version
MacOS 15.2
Output from
:checkhealth neotest-golang
Your Neotest and neotest-golang Lua setup
--
Describe the problem
Hi folks,
I have an interesting problem where I need help :-) on my company macbook I want to test some project, but go test fails because this project has some dependencies that are not available on a macbook:
I had to fall back to jetbrains IDEA to commence the tests because there it is fairly easy to setup testing in a docker container. I am using this Dockerfile to setup the container image:
IDEA creates the two following relevant files for the tests:
remote-targets.xml
.run/run.xml
This effectively starts a docker container and the IDEA debugger somehow attaches to that.
Is it somehow possible to build this with neotest-golang? Any recommendations / examples for this? Help is much appreciated!
Beta Was this translation helpful? Give feedback.
All reactions