Skip to content

feat(ci): add a go-test-timeout input to reusable-ci - #376

Merged
jdfalk merged 1 commit into
mainfrom
fix/go-test-timeout
Oct 16, 2026
Merged

jdfalk merged 1 commit into
mainfrom
fix/go-test-timeout

Conversation

@jdfalk

@jdfalk jdfalk commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

Lets callers raise Go's per-test-binary timeout in reusable-ci.yml's Go CI job. falkcorp/audiobook-organizer's internal/database package runs 510–600s under -race there, right at Go's 10m default, and was failing on it. A caller couldn't raise that limit before this change.

Issues Addressed

feat(ci): go-test-timeout input

Description: The go-test command in gha-ci-workflow-helpers (embedded Python, action.yml:541 at the pinned 4b5f4d4) runs go test -v -race -coverprofile=... ./... with no -timeout flag. It does not read GHCOMMON_SCRIPTS_DIR, so changing ci_workflow.py here would have no effect. The action also has no timeout input. go test does read test flags from GOFLAGS, so when go-test-timeout is set, both Go test steps run with GOFLAGS=-timeout=<value>. When it is empty (the default), nothing changes.

The go-ci job cap goes from 40 to 60 minutes. It has to stay above setup (~4.5m) + the slowest suite (~20.5m) + the test timeout, and 60 keeps that true for timeouts up to 30m. The comment next to the cap and the input's description both say this.

Files Modified:

Testing

  • Local check (go1.24.7) with a test that sleeps 3s: GOFLAGS=-timeout=1s go test -race ./... failed at 1.02s with the goroutine dump; -timeout=10s passed. GOFLAGS=-timeout=1s go build ./... and go tool cover -func ignored the flag and succeeded.
  • The workflow YAML parses. actionlint is not installed in this environment.

Breaking Changes

None. The input is optional and defaults to empty. The only change callers see without opting in is the higher job cap, and that only matters for a run that hangs.

Additional Notes

A follow-up PR in falkcorp/audiobook-organizer passes go-test-timeout: '25m' (the same value as its Makefile and its other CI jobs). Its reusable-ci.yml@ pins have to move to this PR's merge SHA.

Checklist

  • Code follows the style guidelines of this project
  • Self-review of the code has been performed
  • Code has been commented, particularly in hard-to-understand areas
  • Corresponding changes to documentation have been made
  • Changes generate no new warnings
  • Tests have been added that prove the fix is effective or that the feature works (workflow change; checked locally as described above)
  • New and existing unit tests pass locally with the changes

🤖 Generated with Claude Code

https://claude.ai/code/session_015uvXsjoTL4866VhFevH7wW


Generated by Claude Code

The go-test helper action runs go test with no -timeout, so Go's 10m
per-binary default applied and callers could not raise it. The new input
is passed as GOFLAGS=-timeout=<value> on the Go test steps. The go-ci job
cap moves from 40 to 60 minutes so a 30m test timeout still fires before
the runner cancels the job.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015uvXsjoTL4866VhFevH7wW
@github-actions github-actions Bot added size/M github-actions GitHub Actions related work type:documentation Improvements or additions to documentation type:testing Testing related work module:config Configuration management workflow:github-actions GitHub Actions workflows labels Oct 16, 2026
@jdfalk
jdfalk marked this pull request as ready for review October 16, 2026 23:46
@jdfalk
jdfalk merged commit 4902832 into main Oct 16, 2026
42 checks passed
@jdfalk
jdfalk deleted the fix/go-test-timeout branch October 16, 2026 23:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

github-actions GitHub Actions related work module:config Configuration management size/M type:documentation Improvements or additions to documentation type:testing Testing related work workflow:github-actions GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants