Skip to content

Commit b59b67b

Browse files
akoclaude
andcommitted
ci: scope the cross-platform tunnel job to the seam tests (refs #897)
The new windows/macOS job ran the full docker + tunnelhub packages, which fails on Windows for reasons that predate this branch: three tests assert POSIX file modes (0600) that Windows does not implement (os.Chmod only toggles the read-only bit, so Stat reports 666), one asserts a world-readable file is refused, and one assumes Unix path separators. macOS passes all of them. Filed as #897. Scope the job with -run to the seam's own !linux tests. The full test binaries are still compiled for each platform, so a Windows/macOS build break is still caught; only the stub behaviour is executed. Assert that at least 4 seam tests actually ran, since -run passes vacuously when its pattern matches nothing. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent b45b288 commit b59b67b

1 file changed

Lines changed: 25 additions & 1 deletion

File tree

.github/workflows/push-test.yml

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,31 @@ jobs:
2525
with:
2626
go-version: '1.26.6'
2727
- name: Test the tunnel seam
28-
run: go test ./cmd/mxcli/docker/... ./cmd/mxcli/tunnelhub/...
28+
shell: bash
29+
# Scoped with -run to the seam's own tests. The full test binaries are still
30+
# COMPILED for this platform, so a Windows/macOS build break is still caught;
31+
# only the !linux stub behaviour is executed.
32+
#
33+
# Running the whole packages here fails on Windows for reasons that predate
34+
# this change and are unrelated to the tunnel: several tests assert POSIX file
35+
# modes (0600) that Windows does not implement — os.Chmod only toggles the
36+
# read-only bit, so Stat reports 666 — plus one path-separator assumption.
37+
# Tracked separately in #897; widening this job is that issue's job, not this
38+
# one's.
39+
#
40+
# -run can pass vacuously if the tests are renamed or deleted, so assert that
41+
# the expected number actually ran.
42+
run: |
43+
out=$(go test -v -count=1 -run 'Unsupported' ./cmd/mxcli/docker/... ./cmd/mxcli/tunnelhub/...)
44+
echo "$out"
45+
n=$(printf '%s\n' "$out" | grep -c '^--- PASS: Test.*Unsupported' || true)
46+
echo "seam tests executed: $n"
47+
if [ "$n" -lt 4 ]; then
48+
echo "FAIL: expected at least 4 tunnel-seam tests to run, -run matched $n."
49+
echo " The !linux stubs in cmd/mxcli/docker and cmd/mxcli/tunnelhub"
50+
echo " must each keep a test whose name contains 'Unsupported'."
51+
exit 1
52+
fi
2953
3054
build-and-test:
3155
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)