fix: use pre-built binary instead of go run in e2e tests (#16236)

Using `go run` inside of a test is fragile, because it means we have to
wait for `go` to compile the binary while also constrained on resources
by the fact that Playwright and coderd are already running. We should
instead compile a coder binary for the current platform before the tests
and use it directly.
This commit is contained in:
ケイラ
2025-01-23 09:45:50 -07:00
committed by GitHub
parent 84081e90eb
commit 5f4ff58f84
13 changed files with 75 additions and 72 deletions
+6 -1
View File
@@ -944,7 +944,12 @@ test-clean:
go clean -testcache
.PHONY: test-clean
test-e2e: site/node_modules/.installed site/out/index.html
site/e2e/bin/coder: go.mod go.sum $(GO_SRC_FILES)
go build -o $@ \
-tags ts_omit_aws,ts_omit_bird,ts_omit_tap,ts_omit_kube \
./enterprise/cmd/coder
test-e2e: site/e2e/bin/coder site/node_modules/.installed site/out/index.html
cd site/
ifdef CI
DEBUG=pw:api pnpm playwright:test --forbid-only --workers 1