All checks were successful
CI / goreleaser-lint (pull_request) Successful in 8s
CI / format (pull_request) Successful in 1m33s
CI / lint (pull_request) Successful in 3m23s
CI / build (pull_request) Successful in 3m5s
CI / test (pull_request) Successful in 4m38s
CI / e2e (pull_request) Successful in 26m24s
playwright-go v0.5200.1 fetches its driver from playwright.azureedge.net and two sibling mirrors. Microsoft retired that CDN, so the e2e job died on a 404 before it ever reached a test. The replacement host serves no builds/driver zip for any version — 1.52 through 1.62 all answer 400 — so there is nothing to pin or mirror to. v0.6100.0 onwards pulls playwright-core from npm and Node from nodejs.org instead, and moves the module path back to github.com/mxschmitt/playwright-go. Take v0.6201.1, the latest. The Playwright 1.52 to 1.62 jump needs no changes beyond the import path. The CLI must match the module the tests link against, and the three places that ran it had already drifted apart: the workflow pinned v0.5200.1, the Makefile and scripts/e2e.sh asked for @latest. Both now read the version from e2e/go.mod, and the workflow calls make e2e-install.
37 lines
1.1 KiB
Shell
Executable file
37 lines
1.1 KiB
Shell
Executable file
#!/usr/bin/env bash
|
|
set -e
|
|
|
|
echo "🧪 Running Hako E2E Tests"
|
|
|
|
# Environment setup
|
|
export TESTCONTAINERS_RYUK_DISABLED="${TESTCONTAINERS_RYUK_DISABLED:-true}"
|
|
export DOCKER_HOST="${DOCKER_HOST:-unix:///var/run/docker.sock}"
|
|
|
|
# Check Docker
|
|
if ! docker info > /dev/null 2>&1; then
|
|
echo "❌ Error: Docker is not available (check DOCKER_HOST and socket mount)"
|
|
exit 1
|
|
fi
|
|
|
|
# Install Playwright if needed, pinned to the module the tests link against
|
|
PLAYWRIGHT_MODULE="github.com/mxschmitt/playwright-go"
|
|
PLAYWRIGHT_VERSION="$(cd e2e && go list -m -f '{{.Version}}' "$PLAYWRIGHT_MODULE")"
|
|
PLAYWRIGHT_CMD="$PLAYWRIGHT_MODULE/cmd/playwright@$PLAYWRIGHT_VERSION"
|
|
|
|
if ! go run "$PLAYWRIGHT_CMD" --help > /dev/null 2>&1; then
|
|
echo "📦 Installing Playwright browsers..."
|
|
(cd e2e && go run "$PLAYWRIGHT_CMD" install chromium)
|
|
fi
|
|
|
|
# Build webapp (required for embed)
|
|
echo "🏗️ Building webapp..."
|
|
make build-webapp
|
|
|
|
# Create screenshots directory
|
|
mkdir -p e2e/screenshots
|
|
|
|
# Run tests
|
|
echo "🚀 Running e2e tests..."
|
|
cd e2e && CGO_ENABLED=0 go test -v -timeout=60m ./...
|
|
|
|
echo "✅ E2E tests completed"
|