nix.dev
nix.dev copied to clipboard
Proof-of-concept for testing shell sessions
In https://github.com/nix-dot-dev/nix.dev/pull/248 I introduced a way to export code samples into files, and then test them.
This commit adds an additional improvement on top of that: to test shell session examples, command by command, and verify the output of commands matches the output given in the shell session example.
Deploying with
Cloudflare Pages
| Latest commit: |
7c52a2a
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://df0be80c.nix-dev.pages.dev |
| Branch Preview URL: | https://shell-sessions-testing.nix-dev.pages.dev |
Don't merge yet. Apparently find does not fail if one of the exec commands fail. So we have test failures, but CI thinks everything is OK. Need to rewrite it. Probably to xargs.
Don't merge yet. Apparently
finddoes not fail if one of theexeccommands fail. So we have test failures, but CI thinks everything is OK. Need to rewrite it. Probably toxargs.
This is now taken care of, CI fails on test failures.
What's next is rewriting the test runner to not rely on my shell-darwin.nix.
What's missing here to get this merged?
Fixing the CI.
Rebased off of latest master.
Potentially interesting: https://www.npmjs.com/package/codedown
What about https://zimbatm.github.io/mdsh/ :laughing:
We now have https://github.com/OceanSprint/tesh
We now have https://github.com/OceanSprint/tesh
Yep, I'll rewrite this PR.
Are you still interested in working on this?
Are you still interested in working on this?
Hey @infinisil, long time no hear!
I plan to work on this during OceanSprint but I'm not sure how much time I'll have besides running the logistics of the sprint, so please go ahead and take over if you want to!
Yeah long time no see, hope you're doing good!
I don't have any time to work on this myself either, but we were triaging issues in the documentation team meeting. Since you're planning to work on this, let's leave it open.
Note that this is very related to @mightyiam's recent work on a tester for nix-repl in https://github.com/NixOS/nix.dev/pull/672. Might be good to synchronize on that before diving in. I can recommend checking in with the documentation team on Matrix or the meetings for that :)
I'd say let's close this for now, can always be re-opened (or a new one opened) if work is being done.