Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Support skip_testing input to explicitly skip target testing #192

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .github/workflows/workflow-executor.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions internal/cli/run.go
Original file line number Diff line number Diff line change
@@ -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")
5 changes: 5 additions & 0 deletions internal/environment/environment.go
Original file line number Diff line number Diff line change
@@ -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")
}