From 2d73f2e558e9bd7459b1f27a24afaddc291e53a7 Mon Sep 17 00:00:00 2001 From: zaaack Date: Wed, 9 Oct 2024 19:14:23 +0800 Subject: [PATCH] fix: ci --- .github/workflows/publish.yml | 2 +- .tool-versions | 1 + src/test/task.test.ts | 8 +++++++- 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 .tool-versions diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 10837a4..41b28eb 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -14,7 +14,7 @@ jobs: uses: pnpm/action-setup@v4 - uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: 'pnpm' - name: install run: pnpm i diff --git a/.tool-versions b/.tool-versions new file mode 100644 index 0000000..966f7af --- /dev/null +++ b/.tool-versions @@ -0,0 +1 @@ +nodejs 22.9.0 diff --git a/src/test/task.test.ts b/src/test/task.test.ts index 1163ad1..d6dfe33 100644 --- a/src/test/task.test.ts +++ b/src/test/task.test.ts @@ -35,7 +35,13 @@ function test(cmd: string, expectedExitCode?: number) { }) }, async init() { - let p = await exec(`tsx ./src/cli.ts --config ${fixturesDir}/${cmd}`, {stdio: void 0}).catch(er => er); + let p = await exec(`tsx ./src/cli.ts --config ${fixturesDir}/${cmd}`, { + stdio: void 0, + env: { + ...process.env, + DISABLE_V8_COMPILE_CACHE:'1', + }, + }).catch((er) => er) exitCode = p.exitCode; out = normal(p.stdout + p.stderr) let snapFile = snapsDir + '/' + cmd.replace(/[^\w-]/g, '_')