Install nodejs in the builder image and fix a flaky intersection test
🏗️ Build Plugin / build (push) Successful in 1m10s
🧪 Test Plugin / test (push) Successful in 35s
🚀 Release Plugin / build-and-release (push) Failing after 33s

Two CI fixes.

The builder image lacked nodejs, so every job died at the first step with
"exec: node: executable file not found in $PATH" (exit 127).
actions/checkout and actions/cache are JavaScript actions: the runner
execs node inside the job container to run them, so the image needs it
even though the build itself does not. Verified by exec'ing node with no
shell, which is how the runner invokes it, and by pulling the pushed
image back from the registry.

TwoExplicitLists_IntersectToTheCommonLibraries compared a sorted actual
against an unsorted hardcoded expected, so it only passed when the
randomly generated library GUIDs happened to sort that way - it failed
about half of all runs and would have made CI intermittently red. The
intersection is a set, so it now asserts on membership and count rather
than ordering. Confirmed with 10 consecutive clean runs, up from ~50%.
This commit is contained in:
2026-07-30 00:10:34 +02:00
parent 92c7dcb871
commit a2780915bb
2 changed files with 11 additions and 1 deletions
@@ -78,7 +78,11 @@ public class LibraryAccessTests
var result = service.ComputeIntersection([alice.Id, bob.Id]);
Assert.Equal([Shows, Kids], result.OrderBy(g => g).ToList().OrderBy(g => g).ToList());
// The intersection is a set: assert on membership, not on ordering. The library ids are
// random GUIDs, so any order-sensitive assertion would pass or fail by luck of the draw.
Assert.Equal(2, result.Count);
Assert.Contains(Shows, result);
Assert.Contains(Kids, result);
Assert.DoesNotContain(Movies, result);
Assert.DoesNotContain(Adult, result);
}