Skip to content

Generate a workflow that lints and tests every pull request - #46

Merged
MarkRosemaker merged 1 commit into
mainfrom
feat/test-workflow
Nov 11, 2026
Merged

MarkRosemaker merged 1 commit into
mainfrom
feat/test-workflow

Conversation

@MarkRosemaker

Copy link
Copy Markdown
Owner

devtool now generates .github/workflows/test.yml. It is based on gorepo's workflow, with two changes:

  • golangci-lint is installed at the version pinned in devtool.json (tools.golangci-lint), not @latest, so a new linter release can't turn a PR red on its own. Where there's no pin, it falls back to latest.
  • Tests run as go test -race ./..., matching make test-race.

It runs on pull_request only, so the bot's commits to main don't use Actions minutes.

Where it's written: only in repositories that vendor (vendor/modules.txt). A runner can't read private modules, so in a repository without vendor/, a private dependency would fail the job. If a repository stops vendoring, the generated workflow is removed. A workflow without devtool's marker is left alone. That includes gorepo's current, hand-written test.yml: delete it there and devtool will generate its own.

AGENTS.md: where the workflow exists, the Committing section gets a bullet saying what a PR runs, and that a check of your own goes in a separate workflow file.

  • New tests: a golden file for the workflow, no workflow without vendoring (and removal once vendoring goes), and a hand-written workflow left alone. The full AGENTS golden shows the new bullet.
  • docs/architecture.md and the README list the new generated file.
  • devtool's own workflow, regenerated with this branch's build, is part of this PR, so this PR should be the first to run it.
  • make ci passes.

Generated by Claude Code

devtool now writes .github/workflows/test.yml: golangci-lint at the
version devtool.json pins, then go test -race ./..., on each pull
request. Only where the repository vendors, since a runner can read no
private module; a workflow somebody wrote is left alone. AGENTS.md says
so where the workflow is there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01M6xJuQgmRd19QozaQDD3tk
@MarkRosemaker
MarkRosemaker merged commit 618b9a7 into main Nov 11, 2026
1 check passed
@MarkRosemaker
MarkRosemaker deleted the feat/test-workflow branch November 11, 2026 21:11
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.

2 participants