feat(env-setup): test_binaries for spawn-subprocess test deps (redis, nats)#24
Merged
AndriiTsok merged 1 commit intomainfrom Apr 18, 2026
Merged
Conversation
Adds a new `.environment.yml` field `test_binaries` that installs
external daemon binaries onto the runner's PATH. Distinct from the
existing `services` block which starts docker containers — this is
for tests that spawn and manage the daemon themselves via
Command::new("redis-server") / Command::new("nats-server").
Initial coverage:
- `test_binaries.redis: true` — `sudo apt-get install redis-server`
(Linux). Service disabled so tests can control lifecycle.
- `test_binaries.nats: true` — fetches the latest stable nats-server
release from github.com/nats-io/nats-server and installs to
/usr/local/bin/nats-server. Resolves the tag via a HEAD request
to the /releases/latest URL (no github token needed) and then
downloads the {arch}.tar.gz asset.
Adding further binaries later is a small additive change — new
boolean under `test_binaries`, new install step gated on it.
Surfaced by mcpg-dev/source-code: mcpg-plugin-binding-nats has unit
tests that spawn nats-server as a subprocess, which had been
silently skipped for weeks by the nx-ci coverage bug. After fixing
that bug, those tests started failing because nats-server isn't on
the runner by default. This closes the loop.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New
.environment.ymlblock:Installs the binary onto the runner's PATH so tests that do
Command::new("redis-server")/Command::new("nats-server")work. Distinct from the existingservicesblock (docker containers).Install mechanisms
sudo apt-get install redis-server. Service disabled after install so tests control lifecycle.github.com/nats-io/nats-server/releases/latestvia a redirect HEAD, then downloads the{linux-amd64|linux-arm64}.tar.gzand installs to/usr/local/bin/nats-server. No GitHub token needed.Adding more binaries later is a small additive change — new boolean under
test_binaries, new install step gated on it.Why now
mcpg-dev/source-code has unit tests in
mcpg-plugin-binding-natsthat spawnnats-serveras a subprocess. Those tests had been silently skipped by the old nx-ci coverage bug; fixing that bug surfaced the missing dependency. This PR is the "install it instead of skip it" side of the user's response.Plan after merge
Tag
v1.4.0, movev1.🤖 Generated with Claude Code