fix tmp dirs #2
@@ -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
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
import { afterEach, expect, test } from "bun:test";
|
import { afterEach, expect, test } from "bun:test";
|
||||||
import { chmod, mkdir, mkdtemp, rm, symlink, writeFile } from "node:fs/promises";
|
import { chmod, mkdir, mkdtemp, rm, symlink, writeFile } from "node:fs/promises";
|
||||||
|
import { tmpdir } from "node:os";
|
||||||
import { join } from "node:path";
|
import { join } from "node:path";
|
||||||
import { Agent, Model, Plugin, Provider } from "@opencode/plugin";
|
import { Agent, Model, Plugin, Provider } from "@opencode/plugin";
|
||||||
import type { AgentEditor } from "@opencode/plugin/promise/agent";
|
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 () => {
|
test("playwright MCP prefers direct MCP, uses npx for Playwright, and preserves fallback behavior", async () => {
|
||||||
const originalPath = process.env.PATH;
|
const originalPath = process.env.PATH;
|
||||||
process.env.PATH = "";
|
const root = await mkdtemp(join(tmpdir(), "stanp-playwright-"));
|
||||||
const root = await mkdtemp("/tmp/opencode/stanp-playwright-");
|
|
||||||
try {
|
try {
|
||||||
|
process.env.PATH = "";
|
||||||
const packageRoot = join(root, "local", "node_modules", "@playwright", "mcp");
|
const packageRoot = join(root, "local", "node_modules", "@playwright", "mcp");
|
||||||
const executable = join(packageRoot, "cli.js");
|
const executable = join(packageRoot, "cli.js");
|
||||||
const localProject = join(root, "local", "project");
|
const localProject = join(root, "local", "project");
|
||||||
|
|||||||
Reference in New Issue
Block a user