Skip to content

Commit

Permalink
refactor: add optional timeout field in BaseActionConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
vvagaytsev committed May 5, 2023
1 parent 0f2c3d2 commit 35a343e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 7 deletions.
1 change: 0 additions & 1 deletion core/src/actions/build.ts
Expand Up @@ -52,7 +52,6 @@ export interface BuildActionConfig<T extends string = string, S extends object =
allowPublish?: boolean
buildAtSource?: boolean
copyFrom?: BuildCopyFrom[]
timeout?: number
}

export const copyFromSchema = createSchema({
Expand Down
4 changes: 1 addition & 3 deletions core/src/actions/run.ts
Expand Up @@ -19,9 +19,7 @@ import { Action, BaseActionConfig } from "./types"
import { DEFAULT_RUN_TIMEOUT_SEC } from "../constants"

export interface RunActionConfig<N extends string = any, S extends object = any>
extends BaseRuntimeActionConfig<"Run", N, S> {
timeout?: number
}
extends BaseRuntimeActionConfig<"Run", N, S> {}

export const runActionConfigSchema = memoize(() =>
baseRuntimeActionConfigSchema().keys({
Expand Down
4 changes: 1 addition & 3 deletions core/src/actions/test.ts
Expand Up @@ -19,9 +19,7 @@ import { Action, BaseActionConfig } from "./types"
import { DEFAULT_TEST_TIMEOUT_SEC } from "../constants"

export interface TestActionConfig<N extends string = any, S extends object = any>
extends BaseRuntimeActionConfig<"Test", N, S> {
timeout?: number
}
extends BaseRuntimeActionConfig<"Test", N, S> {}

export const testActionConfigSchema = memoize(() =>
baseRuntimeActionConfigSchema().keys({
Expand Down
2 changes: 2 additions & 0 deletions core/src/actions/types.ts
Expand Up @@ -79,6 +79,8 @@ export interface BaseActionConfig<K extends ActionKind = ActionKind, T = string,
include?: string[]
exclude?: string[]

timeout?: number

// Variables
// -> Templating with ActionConfigContext allowed
variables?: DeepPrimitiveMap
Expand Down

0 comments on commit 35a343e

Please sign in to comment.