A Buildkite plugin for running Go code directly on your agent machines. It does this by setting the $GOPATH
, and checking out your project into the correct directory structure.
See also the golang-build plugin.
The following pipeline will ensure the project is checked out into the correct $GOPATH/src
directory before running the go test
command:
steps:
- command: go test
plugins:
- gopath-checkout#v2.0.0:
import: github.com/my-org/my-project
The import path to use when the project is checked out. For example, if you develop in $GOPATH/src/github.com/my-org/my-project
then the import
option should be github.com/my-org/my-project
.
To run testing, shellchecks and plugin linting use use bk run
with the Buildkite CLI.
bk run
Or if you want to run just the tests, you can use the docker Plugin Tester:
docker run --rm -ti -v "${PWD}":/plugin buildkite/plugin-tester:latest
- Prepend to existing
$GOPATH
s instead of replacing
MIT (see LICENSE)