From 62b56b6a8a48a3c0e4e7422058c2321004f12c9c Mon Sep 17 00:00:00 2001 From: StanPonomarev Date: Sat, 12 Sep 2026 19:09:49 +0200 Subject: [PATCH] fix tmp dirs --- .gitea/workflows/ci.yml | 29 +++++++++++++++++++++++++++++ tests/plugin.test.ts | 5 +++-- 2 files changed, 32 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/ci.yml diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 0000000..b3e250f --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,29 @@ +name: CI + +on: + pull_request: + +permissions: + code: read + +jobs: + verify: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: https://github.com/actions/checkout@v4 + with: + github-server-url: ${{ gitea.server_url }} + persist-credentials: false + - name: Install Bun + uses: https://github.com/oven-sh/setup-bun@v2 + with: + bun-version: "1.3.14" + - name: Verify and build + run: | + bun install --frozen-lockfile + bun run check + bun run lint + bun run format:check + bun run test + bun run build diff --git a/tests/plugin.test.ts b/tests/plugin.test.ts index ad5d353..92384c7 100644 --- a/tests/plugin.test.ts +++ b/tests/plugin.test.ts @@ -1,5 +1,6 @@ import { afterEach, expect, test } from "bun:test"; import { chmod, mkdir, mkdtemp, rm, symlink, writeFile } from "node:fs/promises"; +import { tmpdir } from "node:os"; import { join } from "node:path"; import { Agent, Model, Plugin, Provider } from "@opencode/plugin"; import type { AgentEditor } from "@opencode/plugin/promise/agent"; @@ -418,9 +419,9 @@ test("coordinator inherits only codegraph MCP permissions when that server exist test("playwright MCP prefers direct MCP, uses npx for Playwright, and preserves fallback behavior", async () => { const originalPath = process.env.PATH; - process.env.PATH = ""; - const root = await mkdtemp("/tmp/opencode/stanp-playwright-"); + const root = await mkdtemp(join(tmpdir(), "stanp-playwright-")); try { + process.env.PATH = ""; const packageRoot = join(root, "local", "node_modules", "@playwright", "mcp"); const executable = join(packageRoot, "cli.js"); const localProject = join(root, "local", "project");