Skip to main content

CI/CD

Chronos includes GitHub Actions workflows for continuous integration and automated releases.

Continuous Integration

The CI workflow (.github/workflows/ci.yml) runs on every push to main and on pull requests.

Pipeline Steps

StepDescription
LintRuns golangci-lint with the project config
BuildCompiles all packages with go build ./...
TestRuns tests with race detector on Ubuntu and macOS
VetStatic analysis with go vet ./...
ExamplesSmoke-tests all example programs
DockerVerifies the Docker image builds

Running Locally

You can replicate the CI pipeline locally using the Makefile:

make all # fmt + vet + lint + build
make test # run tests with race detector

Or run individual steps:

make fmt # format source files
make vet # go vet
make lint # golangci-lint (requires golangci-lint installed)
make build-all # compile all packages
make test-cover # tests with HTML coverage report

Release Workflow

The release workflow (.github/workflows/release.yml) triggers when a semver tag is pushed.

Steps

  1. Tests gate the release
  2. Go module is published to the Go module proxy
  3. Cross-platform binaries are built for Linux, macOS, and Windows (amd64 + arm64)
  4. GitHub Release is created with binaries and SHA-256 checksums
  5. Docker image is built for linux/amd64 and linux/arm64 and pushed to ghcr.io

Cutting a Release

git tag v0.2.0
git push origin v0.2.0

This triggers the full release pipeline. The resulting artifacts:

ArtifactLocation
Go modulepkg.go.dev/github.com/spawn08/chronos
CLI binariesGitHub Release assets
Docker imageghcr.io/spawn08/chronos:v0.2.0
Checksumschecksums.txt in release assets

Supported Platforms

OSArchitecture
Linuxamd64, arm64
macOSamd64, arm64 (Apple Silicon)
Windowsamd64, arm64

Dependabot

Automated dependency updates are configured in .github/dependabot.yml:

EcosystemSchedule
Go modulesWeekly
GitHub ActionsWeekly
DockerWeekly

Dependabot creates pull requests for outdated dependencies. The CI workflow validates each PR before merging.

Branch Protection

Recommended settings for the main branch:

  • Require status checks to pass (CI lint, build, test)
  • Require pull request reviews
  • Require linear history
  • Do not allow force pushes

Adding Custom CI Steps

To add a new CI job, edit .github/workflows/ci.yml:

jobs:
custom-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "1.24"
- run: go build ./...
- run: your-custom-check