/goci

High-level CI config DSL written in Go based on Dagger

Primary LanguageGoMIT LicenseMIT

Go CI

GitHub Workflow Status Go Version go.dev reference built with nix

High-level CI config DSL written in Go based on Dagger.

⚠️ This tool is still under heavy development! Things may change. ⚠️

Features

  • Go test
  • GolangCI Lint
  • CI detection
  • CodeCov upload
  • Build pipelines
    • Build matrix
    • Pipelines
    • Step dependencies

Goals

  • Create a high-level interface for building a CI based on Dagger
  • Hide low-level (Dagger) details as much as possible

Usage

Install the library:

go get github.com/sagikazarmark/goci

Create CLI tool:

package main

func main() {
	client, err := dagger.Connect(ctx)
	if err != nil {
		return panic(err)
	}
	defer client.Close()

	c := golang.Test(client)

	output, err := container.Stdout(ctx)
	if err != nil {
		return panic(err)
	}

	fmt.Print(output)
}

License

The project is licensed under the MIT License.