internal/ci: add base steps for the common Go checks and staticcheck
Downstream github packages can use these as needed,
setting the working-directory parameter for multi-module repositories.
The staticcheck step is switched from the upstream action to `go tool`,
because the action hard-codes STATICCHECK_CACHE under `runner.temp`,
which Namespace confirmed to be incompatible with their volume caching
due to the nature of `runner.temp` being wiped once a job finishes.
We already planned to move towards `go tool staticcheck` once Go 1.24
came out, so take advantage of the situation and do the jump now.
We can do this in the cue repo, even though it still supports 1.23,
because we only run staticcheck on CI on the latest Go version.
Note that we add the tool dependency in a new internal/tools.mod module,
so as to keep go.mod as small as possible, and not have MVS mix
tooling dependencies with our regular dependencies.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: Ia2a50a4addec22cf20e9e24f444442874e22e8be
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1218982
Reviewed-by: Paul Jolly <paul@myitcv.io>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>