From 90b5e59cc134ab2c6d2522bfc23b0912df19f57f Mon Sep 17 00:00:00 2001 From: PJ Date: Sat, 22 Aug 2026 21:08:56 +0530 Subject: [PATCH] ci: run the 541 lines of tag-gated tests The withsidecar tag appeared only under go build, go install and go run, so internal/sidecarassets' 167 lines, including a four-goroutine torn-write race test, had never been compiled into a test binary. The three withcompanion files were reachable only through make test-companion, which no job invoked. Both now run: the sidecar tests in check-tests while JDK 17 is still active, the companion tests in folio-ios where the bundles are already staged. --- .github/workflows/ci.yml | 14 ++++++++++++++ Makefile | 9 ++++++++- 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fc2b269..440f77e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,6 +118,13 @@ jobs: - name: Run tests run: make test + # The withsidecar-tagged tests had never been compiled into a test + # binary: the tag appears only under go build, go install and go run. + # They cover the embedded JAR's extraction, checksum reuse and the + # concurrent-extraction race, so they need the staged JAR to be real. + - name: Run the sidecar-tagged tests + run: make test-sidecar + # folio is its own gradle build, and the metro plugin it compiles with # needs a 21 runtime where the sidecar toolchain pins 17. Switching # JAVA_HOME after `make test` rather than installing both up front @@ -266,6 +273,13 @@ jobs: - name: Build sanderling run: make sanderling-ios + # The withcompanion-tagged tests are reachable only through this target + # and no other job invokes it. It runs here because staging the companion + # and runner bundles needs the darwin toolchain, and make sanderling-ios + # has already built both. + - name: Run the companion-tagged tests + run: make test-companion + # simctl resolves a device by name alone, and one image carries the same # phone under several runtimes: iPhone 17 Pro exists here on iOS 26.2, # 26.4 and 26.5. Booting by name is therefore booting on whichever one diff --git a/Makefile b/Makefile index b892ee8..6045873 100644 --- a/Makefile +++ b/Makefile @@ -29,7 +29,7 @@ WEB_DIST := replay-ui/dist GOLINES := $(shell $(GO) env GOPATH)/bin/golines -.PHONY: bootstrap proto sidecar sidecar-embed sanderling build sanderling-web sanderling-android sanderling-ios install test test-go test-browser test-companion test-kotlin test-folio test-spec-api test-ci-scripts spec-typecheck web-test web-typecheck web-build web-dev replay-dev docs clean release-cli release-npm-dry fmt fmt-go fmt-kotlin fmt-ts fmt-swift +.PHONY: bootstrap proto sidecar sidecar-embed sanderling build sanderling-web sanderling-android sanderling-ios install test test-go test-browser test-companion test-sidecar test-kotlin test-folio test-spec-api test-ci-scripts spec-typecheck web-test web-typecheck web-build web-dev replay-dev docs clean release-cli release-npm-dry fmt fmt-go fmt-kotlin fmt-ts fmt-swift bootstrap: $(GO) mod download @@ -148,6 +148,13 @@ test-browser: test-companion: $(COMPANION_EMBED) $(RUNNER_EMBED) $(GO) test -tags withcompanion ./internal/driver/ioscompanion/... +# Runs the withsidecar-tagged tests (embedded size, extraction, checksum reuse +# and the concurrent-extraction race) against the real JAR. Kept out of `test` +# because staging the JAR needs the android toolchain. Untagged, the package +# builds against the stub and these never compile. +test-sidecar: $(SIDECAR_EMBED) + $(GO) test -tags withsidecar ./internal/sidecarassets/... + test-kotlin: ANDROID_HOME=$(ANDROID_HOME) $(GRADLE) :sidecar:test