The workflows in this repo all help drive the CI in this organization's Golang repos. There are a few workflows defined here that are reusable in github actions.
All these workflows expect to test a modules-enabled go repo and take some common arguments:
module_base
: The directory containing the code base under test. Defaults to.
go_version
: The version of go under test. If unset, this will use the version given in go.mod undermodule_base
.
This workflow runs go test
against a module.
Example workflow:
jobs:
tests:
uses: "boinkor-net/ci-baseline-go/.github/workflows/ci_baseline_go_tests.yml@main"
with:
module_base: "cmd/hello-world"
This workflow runs go build
against a module. It has options:
subdir
: The directory containing the main.go file resulting in the executable. Defaults to.
Example workflow:
jobs:
build:
uses: "./.github/workflows/ci_baseline_go_build.yml"
with:
module_base: "go/"
subdir: cmd/hello-world
This workflow runs golangci-lint
and goimports
against a module, as two separate / parallel jobs.
Example workflow:
success_lints:
uses: "./.github/workflows/ci_baseline_go_lints.yml"
with:
module_base: "cmd/hello-world"