From 19abddb997a965358a712ff84f048cc7397a4654 Mon Sep 17 00:00:00 2001 From: weishu Date: Thu, 25 Dec 2025 11:07:06 +0800 Subject: [PATCH] chore: setup integration test environment in CI workflow --- .github/workflows/test.yml | 9 +++++++++ cli/package.json | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7d8a8a80..1d5190a5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -12,4 +12,13 @@ jobs: - uses: oven-sh/setup-bun@v2 - run: bun install - run: bun typecheck + - name: Create integration test env + run: | + { + echo "HAPI_HOME=~/.hapi-dev-test" + echo "HAPI_SERVER_URL=http://localhost:3006" + echo "CLI_API_TOKEN=${CLI_API_TOKEN:-dev-test-token}" + echo "HAPI_DAEMON_HTTP_TIMEOUT=60000" + echo "HAPI_DAEMON_HEARTBEAT_INTERVAL=30000" + } > cli/.env.integration-test - run: bun run test diff --git a/cli/package.json b/cli/package.json index b46d96b8..93cc26d5 100644 --- a/cli/package.json +++ b/cli/package.json @@ -43,7 +43,7 @@ "publish-npm:dry-run": "bun run scripts/publish-npm.ts --dry-run", "tools:unpack": "bun run scripts/unpack-tools.ts", "update-homebrew-formula": "bun run scripts/update-homebrew-formula.ts", - "test": "tsx --env-file .env.integration-test node_modules/.bin/vitest run", + "test": "vitest run", "test:win": "vitest run", "dev": "tsx src/index.ts", "dev:local-server": "tsx --env-file .env.dev-local-server src/index.ts",