Skip to content

feat: add scoped Swift CI and narrow Go workflow triggers#24

Merged
baiirun merged 4 commits into
mainfrom
gha-swift-go-workflows
Mar 15, 2026
Merged

feat: add scoped Swift CI and narrow Go workflow triggers#24
baiirun merged 4 commits into
mainfrom
gha-swift-go-workflows

Conversation

@baiirun

@baiirun baiirun commented Mar 15, 2026

Copy link
Copy Markdown
Owner

The repository now has two codepaths with different validation needs: the existing Go CLI/runtime and the Swift package under macos/ControlCenter. The old CI workflow ran on every push and pull request, which added noise for non-Go changes and still left the Swift package without dedicated GitHub Actions coverage.

What changed and why

  • added a new Swift CI workflow that runs swift build and swift test in macos/ControlCenter when Swift package sources or manifests change
  • scoped the existing Go CI workflow to run only when Go source files or Go dependency manifests change
  • kept each workflow listening to edits to its own YAML file so workflow changes still validate themselves

Before this change, unrelated documentation or repository changes still triggered the Go CI pipeline, and Swift changes had no separate GitHub Actions build/test coverage. After this change, Go CI only runs for Go-relevant changes, while Swift package changes get their own macOS build/test workflow.

The release workflow is unchanged.

Validation: parsed both workflow files successfully, then ran go build ./..., go test ./..., gofmt cleanliness checks, swift build, and swift test locally.

baiirun added 4 commits March 15, 2026 00:15
The repository now contains both Go and Swift code, but the existing CI workflow ran on every push and pull request even when only unrelated files changed. That added noise to reviews and still left the Swift package without any dedicated GitHub Actions coverage.

Add a separate Swift CI workflow that runs swift build and swift test for macos/ControlCenter when Swift package files change, and scope the existing Go CI workflow so it only runs for Go source or dependency updates. Each workflow still triggers on edits to its own YAML so CI configuration changes remain validated without reintroducing broad repo-wide runs.

This change only adjusts workflow triggering and adds Swift package validation in GitHub Actions. It does not change the release workflow or application code.
The PR added scoped Go and Swift workflows, but their display names still reflected generic CI labels instead of the platform each workflow validates.

Rename the workflow titles to Go and macOS so the Actions tab and PR checks clearly describe what each job is responsible for. This only changes workflow metadata and leaves triggers and commands unchanged.
The macOS workflow previously exposed Swift validation as a single combined job, which made it harder to see whether failures came from compilation or test execution.

Split the workflow into separate build and test jobs so GitHub reports them independently. The jobs intentionally remain parallel instead of chaining through needs because GitHub-hosted jobs do not share Swift build output by default, so serializing them would only slow feedback without avoiding a rebuild in the test job.
The macOS workflow already split build and test into separate jobs, but GitHub Actions would display only the lowercase job ids by default.

Add explicit Build and Test job names so the PR checks read clearly in the Actions tab and review UI. This is a metadata-only workflow change; triggers and commands stay the same.
@baiirun
baiirun merged commit cc506b4 into main Mar 15, 2026
6 checks passed
@baiirun
baiirun deleted the gha-swift-go-workflows branch March 15, 2026 05:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant