Conversation
Add -run='^$' to go test invocations in the release workflow and collect-profile.sh so only benchmarks execute. Without this, packages like cli and commands fail their tests in CI (no TTY, missing fixtures) even though they have no benchmarks, causing the PGO profile step to report failures.
Sensitive Change Detection (shadow mode)This PR modifies control-plane files:
|
There was a problem hiding this comment.
Pull request overview
This PR fixes failures during PGO (Profile-Guided Optimization) benchmark profile collection caused by packages (like cli and commands) whose regular tests fail in CI environments without a TTY or required fixtures. The fix adds -run='^$' to go test invocations, which is the standard Go idiom for skipping all test functions while still executing benchmarks.
Changes:
- Add
-run='^$'to thego testinvocation inscripts/collect-profile.shto skip test execution during local PGO profile collection - Add
-run='^$'to thego testinvocation in.github/workflows/release.yml's "Collect PGO profile" step for the same reason
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
scripts/collect-profile.sh |
Adds -run='^$' so only benchmarks run when collecting PGO profiles locally |
.github/workflows/release.yml |
Adds -run='^$' so only benchmarks run in the release pipeline's PGO profile collection step |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Same fix as release.yml — add -run='^$' so only benchmarks execute, not tests that may fail without a TTY.
Summary
-run='^$'togo testinvocations in the release workflow andscripts/collect-profile.shso only benchmarks execute during PGO profile collectioncliandcommandsthat have no benchmarks but whose tests fail in CI (no TTY, missing fixtures)Test plan
go test -bench=. -benchtime=1x -run='^$' ./internal/commands/passes (no tests run)go test -bench=. -benchtime=1x -run='^$' ./internal/cli/passes (no tests run)go test -bench=. -benchtime=1x -run='^$' ./internal/dateparse/runs benchmarks correctlySummary by cubic
Run only benchmarks during PGO profiling and benchmark CI by adding
-run='^$'togo testin the release workflow, the test.yml benchmarks job, andscripts/collect-profile.sh. This avoids CI failures in packages likecliandcommandsthat have no benchmarks but whose tests need a TTY/fixtures.Written for commit 4a007c3. Summary will update on new commits.