Repository navigation
Generate a workflow that lints and tests every pull request - #46
Merged
Merged
Conversation
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
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.
devtool now generates
.github/workflows/test.yml. It is based on gorepo's workflow, with two changes: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 tolatest.go test -race ./..., matchingmake test-race.It runs on
pull_requestonly, so the bot's commits tomaindon'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 withoutvendor/, 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-writtentest.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.
docs/architecture.mdand the README list the new generated file.make cipasses.Generated by Claude Code