From 6c4de3691288e698fd4911026466b267d6a942b7 Mon Sep 17 00:00:00 2001 From: Valentin Date: Mon, 6 Jan 2025 15:21:50 +0200 Subject: [PATCH] update dist folder --- test/config.test.ts | 2 +- test/docker.test.ts | 3 ++- test/github.test.ts | 3 ++- test/piper.test.ts | 5 +++-- test/sidecar.test.ts | 3 ++- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/test/config.test.ts b/test/config.test.ts index a49cc967..b1c8071d 100644 --- a/test/config.test.ts +++ b/test/config.test.ts @@ -10,7 +10,7 @@ import * as artifact from '@actions/artifact' import * as config from '../src/config' import * as execute from '../src/execute' import * as github from '../src/github' -import type { ActionConfiguration } from '../src/piper' +import type { ActionConfiguration } from '../src/types' jest.mock('@actions/exec') jest.mock('@actions/tool-cache') diff --git a/test/docker.test.ts b/test/docker.test.ts index 94d17e36..77352f68 100644 --- a/test/docker.test.ts +++ b/test/docker.test.ts @@ -3,7 +3,8 @@ import path from 'path' import * as exec from '@actions/exec' import * as core from '@actions/core' import * as sidecar from '../src/sidecar' -import { type ActionConfiguration, internalActionVariables } from '../src/piper' +import { internalActionVariables } from '../src/piper' +import { type ActionConfiguration } from '../src/types' import { cleanupContainers, getOrchestratorEnvVars, diff --git a/test/github.test.ts b/test/github.test.ts index 7be56017..5fba3cdd 100644 --- a/test/github.test.ts +++ b/test/github.test.ts @@ -4,7 +4,8 @@ import * as toolCache from '@actions/tool-cache' import * as octokit from '@octokit/core' import * as core from '@actions/core' -import { downloadPiperBinary, buildPiperFromSource } from '../src/github' +import { downloadPiperBinary } from '../src/github' +import { buildPiperFromSource } from '../src/build' jest.mock('@actions/core') jest.mock('@actions/exec') diff --git a/test/piper.test.ts b/test/piper.test.ts index e30b2e0f..698f5dc5 100644 --- a/test/piper.test.ts +++ b/test/piper.test.ts @@ -6,6 +6,7 @@ import * as piper from '../src/piper' import * as config from '../src/config' import * as execute from '../src/execute' import * as github from '../src/github' +import * as build from '../src/build' import * as docker from '../src/docker' import * as pipelineEnv from '../src/pipelineEnv' import { GITHUB_COM_API_URL } from '../src/github' @@ -41,7 +42,7 @@ describe('Piper', () => { fs.chmodSync = jest.fn() jest.spyOn(github, 'downloadPiperBinary').mockReturnValue(Promise.resolve('./piper')) - jest.spyOn(github, 'buildPiperFromSource').mockReturnValue(Promise.resolve('./piper')) + jest.spyOn(build, 'buildPiperFromSource').mockReturnValue(Promise.resolve('./build')) jest.spyOn(execute, 'executePiper').mockImplementation() jest.spyOn(config, 'getDefaultConfig').mockImplementation() jest.spyOn(config, 'readContextConfig').mockImplementation() @@ -104,7 +105,7 @@ describe('Piper', () => { await piper.run() - expect(github.buildPiperFromSource).toHaveBeenCalledWith(inputs['piper-version']) + expect(build.buildPiperFromSource).toHaveBeenCalledWith(inputs['piper-version']) expect(docker.cleanupContainers).toHaveBeenCalled() }) diff --git a/test/sidecar.test.ts b/test/sidecar.test.ts index 26420411..044f135a 100644 --- a/test/sidecar.test.ts +++ b/test/sidecar.test.ts @@ -1,7 +1,8 @@ import * as exec from '@actions/exec' import * as core from '@actions/core' import { createNetwork, parseDockerEnvVars, removeNetwork, startSidecar } from '../src/sidecar' -import { type ActionConfiguration, internalActionVariables } from '../src/piper' +import { internalActionVariables } from '../src/piper' +import { type ActionConfiguration } from '../src/types' import { getOrchestratorEnvVars, getProxyEnvVars, getVaultEnvVars } from '../src/docker' import * as docker from '../src/docker'