Skip to content

buildkite/golang-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Buildkite Golang Example

Build status

This repository is an example of testing a Golang project using Buildkite, without using Docker.

👉 Live Pipeline: buildkite.com/buildkite/golang-example

See the full Getting Started Guide for step-by-step instructions on how to get this running, or Add to Buildkite to try it yourself.

Add to Buildkite

How it works

This example:

  • Includes a basic main.go file that prints a message (tested via main_test.go)
  • Uses Go’s built-in testing package with Testify for assertions.
  • Includes a .buildkite/pipeline.yml that runs go test and go vet.
  • Uses a Buildkite-hosted agent with Go preinstalled (via a custom image).
Screenshot of Buildkite Golang example pipeline

🐳 Interested in a Docker-based Go example instead? Check out buildkite/golang-docker-example

Requirements

  • A Buildkite agent with Go installed (or you can use a Buildkite-hosted agent image with Go preinstalled, like this repo does — no setup needed!) See Buildkite Hosted Agents for details.

💡 In this example, the default queue is set in the Buildkite Pipeline Settings → Steps UI, so there's no need to specify it inside the .buildkite/pipeline.yml file.

To try it yourself

Clone the repo and run:

go test ./...

# Or run the program directly:
go run .

License

See Licence.md (MIT)

About

An example on how to test a Golang program using Buildkite

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 6

Languages