diff --git a/.github/workflows/workflow-executor.yaml b/.github/workflows/workflow-executor.yaml index 1268f29b..3a371ae8 100644 --- a/.github/workflows/workflow-executor.yaml +++ b/.github/workflows/workflow-executor.yaml @@ -78,6 +78,11 @@ on: description: "Version of pnpm to install. Not recommended for use without consulting Speakeasy support." required: false type: string + skip_testing: + description: "Set to true to explicitly skip Speakeasy workflow target testing after generation, even when enabled in the Speakeasy workflow configuration. This is useful for running workflow testing as a separate GitHub Actions workflow without affecting/blocking generation." + default: false + required: false + type: boolean poetry_version: description: "Version of poetry to install. Not recommended for use without consulting Speakeasy support." required: false diff --git a/action.yml b/action.yml index e1d20590..06545f8b 100644 --- a/action.yml +++ b/action.yml @@ -94,6 +94,10 @@ inputs: pnpm_version: description: "Version of pnpm to install. Not recommended for use without consulting Speakeasy support." required: false + skip_testing: + description: "Set to true to explicitly skip Speakeasy workflow target testing after generation, even when enabled in the Speakeasy workflow configuration. This is useful for running workflow testing as a separate GitHub Actions workflow without affecting/blocking generation." + default: "false" + required: false poetry_version: description: "Version of poetry to install. Not recommended for use without consulting Speakeasy support." required: false diff --git a/internal/cli/run.go b/internal/cli/run.go index d7e6acaf..c6b73952 100644 --- a/internal/cli/run.go +++ b/internal/cli/run.go @@ -61,6 +61,10 @@ func Run(sourcesOnly bool, installationURLs map[string]string, repoURL string, r args = append(args, "--set-version", environment.SetVersion()) } + if environment.SkipTesting() { + args = append(args, "--skip-testing") + } + if environment.ForceGeneration() { fmt.Println("\nforce input enabled - setting SPEAKEASY_FORCE_GENERATION=true") os.Setenv("SPEAKEASY_FORCE_GENERATION", "true") diff --git a/internal/environment/environment.go b/internal/environment/environment.go index f775f690..fb6defec 100644 --- a/internal/environment/environment.go +++ b/internal/environment/environment.go @@ -97,6 +97,11 @@ func RegistryTags() string { return os.Getenv("INPUT_REGISTRY_TAGS") } +// Enabled if the INPUT_SKIP_TESTING environment variable is set to "true". +func SkipTesting() bool { + return os.Getenv("INPUT_SKIP_TESTING") == "true" +} + func SpecifiedTarget() string { return os.Getenv("INPUT_TARGET") }