Repository navigation
ci: run push builds only on main and skip internal/cmd tests on macOS - #332
Merged
Merged
Conversation
Each push to a PR branch started two full CI runs, one for push and one for pull_request, so every PR push used two macOS runners. Push builds now run only for main. PRs get their run from pull_request. The macOS job ran the full make test for about 9 minutes, and most of that time was the internal/cmd tests. internal/cmd has no darwin-specific code, and the Linux test job runs it with -race. The macOS job now runs make test-other-packages, which covers the darwin-specific code in internal/garminauth and internal/config, and it still builds with cgo for the Keychain.
Owner
Author
|
Independent verification: PASS+NOTES Head What I ran
Notes
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
PR CI takes about 20 minutes. The last run of #329 is an example. The macOS job waited about 10 minutes for a runner and then spent about 9 minutes in
make test. This PR changes two things in.github/workflows/ci.yml:main. Before, each push to a PR branch started two full CI runs, one forpushand one forpull_request. Each run used its own macOS runner. A PR now gets one run, frompull_request. A push tomainstill gets a run.internal/cmdtests. It now runsmake test-other-packagesand the cgo Keychain build.internal/cmdhas no darwin-specific code, and the Linuxtestjob still runs it with-race. The darwin-specific code is ininternal/garminauth/sso.goandinternal/config, andtest-other-packagescovers it. The job namedarwin-cgo-builddoes not change, so the merge rule in AGENTS.md still applies.A branch without a PR no longer gets CI on push.
The slow
internal/cmdtests themselves are a separate change: each test run builds the whole Kong parser again (77 ms under-race, about 6000 times).Verification
make test-other-packagespasses locally in 26 s.TestE2EWorkflowKeepsTheRecordedSetOnTheRunnerstill passes. It reads onlye2e.yml.pull_requestonly.darwin-cgo-buildtook 1 min 13 s, compared with 9 min 21 s and 10 min 46 s in the two runs of feat: set FTP and power zones #329. The Linuxtestjob (10 min 40 s) now sets the total time.