Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/ci:
go generate
after go test
Some packages like ./encoding/jsonschema use `go generate` to produce testdata files, which is an entirely reasonable use case. Because these files get overwritten every time, getting new modtimes, this causes `go test ./...` to treat the test input files as changed, and so CI never reuses a cached test run of the jsonschema package. For this reason, as well as to avoid confusion with developers looking at CI failures (which has happened twice already), test and check first, and generate after. In the happy case, where code generation is clean, this results in no change in behavior other than more test cache hits. In the case where the user forgot to re-run `go generate`, CI will still fail, just a little bit later, which is fine. Signed-off-by: Daniel Martí <[email protected]> Change-Id: I2635095eec950d392f5ccb6da2147e20f7c83584 Reviewed-on: https://review.gerrithub.io/c/cue-lang/cue/+/1201440 Reviewed-by: Roger Peppe <[email protected]> TryBot-Result: CUEcueckoo <[email protected]> Unity-Result: CUE porcuepine <[email protected]>
- Loading branch information