From e47d166c4f02ed483ea4314b3ccafedc9c2f7240 Mon Sep 17 00:00:00 2001 From: CrazyMax Date: Wed, 1 Feb 2023 14:18:45 +0100 Subject: [PATCH] fix jest config Signed-off-by: CrazyMax --- jest.config.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/jest.config.ts b/jest.config.ts index 455328b..c251b91 100644 --- a/jest.config.ts +++ b/jest.config.ts @@ -14,10 +14,14 @@ * limitations under the License. */ +import fs from 'fs'; +import os from 'os'; +import path from 'path'; + process.env = Object.assign({}, process.env, { GITHUB_REPOSITORY: 'docker/actions-toolkit', - RUNNER_TEMP: '/tmp/github_runner', - RUNNER_TOOL_CACHE: '/tmp/github_tool_cache' + RUNNER_TEMP: fs.mkdtempSync(path.join(os.tmpdir(), 'docker-actions-toolkit-github-runner-')).split(path.sep).join(path.posix.sep), + RUNNER_TOOL_CACHE: fs.mkdtempSync(path.join(os.tmpdir(), 'docker-actions-toolkit-github-tool-cache-')).split(path.sep).join(path.posix.sep) }) as { [key: string]: string; };