feat(swift): Add CI GitHub Actions workflow generation #9973
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Linear ticket: N/A
Requested by: [email protected] (@jon-fern)
Session: https://app.devin.ai/sessions/efa19f877f014f9ea0a758cada9e7d0e
Added CI workflow generation for Swift SDK generator to match the behavior of Python, TypeScript, Go, Java, and other language generators. When generating SDKs with output mode set to "github", the Swift generator now creates a
.github/workflows/ci.ymlfile with basic compile and test jobs.Changes Made
generators/swift/sdk/src/SdkGeneratorCli.ts:generate()method to call workflow generation when output mode is 'github'generateGithubWorkflow()method that creates a CI workflow filecompile(runsswift build) andtest(runsswift test)swift-actions/setup-swift@v2action.github/workflows/ci.yml)Testing
pnpm seed test --generator swift-sdksuccessfullyReview Checklist
Important items to review:
Swift version (6.0): Verify this is the appropriate version for production use cases. Based on seed.yml configuration, but should confirm this matches user expectations.
Workflow structure: The workflow uses separate jobs for compile and test, matching other languages. Confirm this is the desired pattern vs. a single job with multiple steps.
Build commands: Uses simple
swift buildandswift testcommands. Verify no additional configuration, dependencies, or build flags are needed for Swift projects.Output mode check: Validates that
context.config.output.mode.type === "github"is the correct conditional (follows pattern from Python/TypeScript generators).Fixture coverage: All 93 Swift SDK fixtures were regenerated. The large number of file changes is expected but worth scanning for any anomalies.