Difficulties debugging GitHub actions that use nix-shell
micahhausler opened this issue · 2 comments
Expected Behaviour
When contributing to Tinkerbell, it should be easy to debug and fix failing CI tests for PRs.
Current Behaviour
The ci-checks.sh
script uses nix-shell
, which is not a standard shell in most Linux distributions. For developers using macOS or common Linux distributions, it is not clear how to debug CI failures. When you try to run the ci-checks.sh
script without nix-shell installed, you'll get the following output
$ ./ci-checks.sh
/usr/bin/env: ‘nix-shell’: No such file or directory
Possible Solution
I think we have at least two options:
- Switch from nix-shell to more standard toling
- Provide documentation on how to debug failing nixos tests. I ran the following to produce the
docker run -it --rm \
-v `pwd`:/go/src/github.com/tinkerbell/tink \
-w /go/src/github.com/tinkerbell/tink \
nixos/nix nix-shell ci-checks.sh
Your Environment
- Operating System and version (e.g. Linux, Windows, MacOS): I'm developing on macOS and also on Linux (Ubuntu 20.04).
Thanks @micahhausler , should this go under https://github.com/tinkerbell/tink/blob/main/CONTRIBUTING.md#nix ( something along the lines of "or you can try it with docker" ) or specifically in its own section for CI?
Providing documentation would definitely be the quicker route. Documentation around this might be something we want regardless.