Run the merge gate only for changes its tests read
Tests / vet + fmt + tests (pull_request) Successful in 1m4s
Tests / vet + fmt + tests (pull_request) Successful in 1m4s
This commit is contained in:
@@ -460,6 +460,13 @@ tokens add cost in proportion to the output.
|
||||
almost always costs an allocation too (a lost pre-size, a per-item map, an extra
|
||||
copy). The benchmark suite (see Development) reports time for a human, not as a
|
||||
pass/fail gate.
|
||||
- **The gate runs only when something it consumes changes.** A PR that touches
|
||||
none of the Go and module files, the Dockerfile, `.dockerignore`, the
|
||||
workflow, the shipped data nor the README skips `docker build` and passes
|
||||
as-is — those are what the build feeds or the tests read (`data_test.go` and
|
||||
`loading_test.go` load `data/`, `readme_test.go` renders every README
|
||||
example), so any other change is a verdict already decided, and waiting would
|
||||
be idle. The check still reports success, so the merge gate stays whole.
|
||||
|
||||
## Development
|
||||
|
||||
@@ -485,7 +492,10 @@ docker compose run --rm --user "$(id -u):$(id -g)" tidy # go mod tidy
|
||||
|
||||
Every pull request runs `docker build .` against both the latest and the lowest
|
||||
supported Go, and must pass before it can be merged. That build is the whole
|
||||
gate — vet, complexity, format check and tests — so run it locally before pushing:
|
||||
gate — vet, complexity, format check and tests — so run it locally before pushing.
|
||||
A PR that touches none of the Go and module files, the Dockerfile,
|
||||
`.dockerignore`, the workflow, the shipped data nor the README skips the build
|
||||
and passes as-is (see [Decisions](#decisions)):
|
||||
|
||||
```sh
|
||||
docker build . # latest
|
||||
|
||||
Reference in New Issue
Block a user