Skip to content

ci: implement initial CI workflow for Go and Web UI#12

Closed
kweinmeister wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
kweinmeister:feature/ci-workflow
Closed

ci: implement initial CI workflow for Go and Web UI#12
kweinmeister wants to merge 3 commits into
GoogleCloudPlatform:mainfrom
kweinmeister:feature/ci-workflow

Conversation

@kweinmeister

Copy link
Copy Markdown
Contributor

This PR introduces a Continuous Integration (CI) workflow using GitHub Actions to ensure code quality and prevent regressions in both the Go backend and Web UI frontend.

Key features:

  • Uses Node.js 24 (LTS) for building frontend assets.
  • Uses latest major versions of official actions (v6/v9).
  • Performs a strict 'gofmt' check to maintain style.
  • Runs memory-safe 'go vet' and fast unit tests (no SQLite).
  • Verifies that the full build (Go + embedded assets) succeeds.
  • Integrated golangci-lint in a mode that only reports on new issues to avoid noise from existing debt.

This resolves a TODO where the Hub was unable to properly resume or restart a stopped agent via a co-located runtime broker dispatcher. It abstracts the StartOptions construction and utilizes the agent manager's Start method with the Resume flag.
This refactor addresses three key improvements in cmd/server.go:
1. DRY: Extracted identical grove path resolution logic into a resolveGrovePath() helper.
2. Clean Architecture: Removed side-effects from buildStartOptions() by moving hubAgent mutation (labels) into the calling dispatch methods.
3. Consistency: Applied the grove ID label consistently across Create, Start, and Restart operations.
This adds a GitHub Actions workflow that:
1. Builds the Web UI (using Node.js 24 LTS).
2. Performs a Go format check.
3. Runs Go lint (vet) and fast tests.
4. Verifies the Go build.
5. Runs golangci-lint on new issues.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant