Skip to content

[Repo Assist] ci: run Go tests in build-go CI job #449

@github-actions

Description

@github-actions

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

The Garage.FeatureFlags Go service has an existing main_test.go with integration tests, but these were never wired into CI. This PR adds go test -v ./... to the build-go job so they run automatically on every relevant change.

What the tests cover

main_test.go contains a TestRun test that:

  1. Starts the HTTP server on a random port (34387)
  2. Verifies the homepage returns "Hello from Go Feature Flags API!" with 200 OK
  3. Verifies GET /flags/{userId} returns {} (empty) when no OFREP endpoint is configured — graceful degradation
  4. Verifies POST /flags/{userId} returns 403 Forbidden when preview mode is not configured

Change

One line added to .github/workflows/ci.yml in the build-go job, after the existing Build step:

- name: Test
  run: go test -v ./...

Test Status

Infrastructure limitation: The sandbox environment running this agent has Go 1.24.13 installed, but the module requires Go 1.25.6. Tests cannot be verified locally.

The CI job uses actions/setup-go with go-version-file: src/Garage.FeatureFlags/go.mod, which installs Go 1.25.6 correctly. The tests should pass in CI.

Risk: Low. This is additive — it only adds test coverage, does not change any application code.

Generated by Repo Assist

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@da02dddebe71d9a937665abdcd1f5214dab852a7

Warning

⚠️ Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • proxy.golang.org

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "proxy.golang.org"

See Network Configuration for more information.


Note

This was originally intended as a pull request, but the git push operation failed.

Workflow Run: View run details and download patch artifact

The patch file is available in the agent-artifacts artifact in the workflow run linked above.

To create a pull request with the changes:

# Download the artifact from the workflow run
gh run download 22668317782 -n agent-artifacts -D /tmp/agent-artifacts-22668317782

# Create a new branch
git checkout -b repo-assist/improve-ci-go-tests-28926f2c28437c7e

# Apply the patch (--3way handles cross-repo patches where files may already exist)
git am --3way /tmp/agent-artifacts-22668317782/aw-repo-assist-improve-ci-go-tests.patch

# Push the branch to origin
git push origin repo-assist/improve-ci-go-tests-28926f2c28437c7e

# Create the pull request
gh pr create --title '[Repo Assist] ci: run Go tests in build-go CI job' --base main --head repo-assist/improve-ci-go-tests-28926f2c28437c7e --repo askpt/openfeature-aspire-sample
Show patch (33 lines)
From bfbeb940d06d79ea581c2e0c8bb46d5295395fec Mon Sep 17 00:00:00 2001
From: Copilot <223556219+Copilot@users.noreply.github.com>
Date: Wed, 4 Mar 2026 12:05:18 +0000
Subject: [PATCH] ci: run Go tests in build-go CI job

The Garage.FeatureFlags service has an existing test file (main_test.go)
with integration tests covering the homepage, get flags, and set flags
endpoints. These tests were never wired into CI.

Add a 'go test -v ./...' step after the build step to run them.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---
 .github/workflows/ci.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b663c34..7271517 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -109,6 +109,8 @@ jobs:
         run: go mod download
       - name: Build
         run: go build -v ./...
+      - name: Test
+        run: go test -v ./...
       - name: Format check
         run: |
           if [ -n "$(gofmt -l .)" ]; then
-- 
2.53.0

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions