From 9d5d5e3a14b66900d1b6cb425d5d98ac5eeb9c6c Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 00:31:46 +0000 Subject: [PATCH 1/2] ci: use the shared Gameplane go-component workflow Replace the copied CI jobs with a call to GameplanePanel/Gameplane's go-component reusable workflow (pinned by SHA), which runs the same lint, race tests with the coverage gate, govulncheck and image build, plus hadolint and a weekly run. Lint now uses Gameplane's root .golangci.yml, so the copied .golangci.yml is removed. Co-Authored-By: Claude Opus 5.5 Signed-off-by: Claude --- .github/workflows/ci.yaml | 81 +++++---------------------------------- .golangci.yml | 49 ----------------------- 2 files changed, 10 insertions(+), 120 deletions(-) delete mode 100644 .golangci.yml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 1fe026a..25779e0 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1,12 +1,14 @@ -# CI for the standalone mcp-server module. Gameplane checks this repo out as -# the mcp-server/ submodule and builds the image from there; lint, tests, -# coverage and govulncheck for the Go code run here. +# CI: the shared Gameplane workflow for split components (lint with Gameplane's +# .golangci.yml and .hadolint.yaml, race tests on amd64 and arm64 with the +# .testcoverage.yml gate, govulncheck, image build). Pinned by SHA. name: ci on: pull_request: push: branches: [main] + schedule: + - cron: "17 4 * * 1" # weekly, so govulncheck sees new advisories workflow_dispatch: permissions: @@ -17,71 +19,8 @@ concurrency: cancel-in-progress: ${{ github.event_name == 'pull_request' }} jobs: - lint: - name: lint - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 - with: - go-version: "1.27" - check-latest: true - - name: gofmt - run: | - unformatted=$(gofmt -l .) - if [ -n "$unformatted" ]; then - echo "gofmt needed on:"; echo "$unformatted"; exit 1 - fi - - name: go vet - run: go vet ./... - - uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0 - with: - version: v2.14.0 - - test: - name: test (${{ matrix.arch }}) - runs-on: ${{ matrix.arch == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-latest' }} - timeout-minutes: 20 - strategy: - fail-fast: false - matrix: - arch: [amd64, arm64] - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 - with: - go-version: "1.27" - check-latest: true - - name: unit test + coverage - run: | - mkdir -p coverage - go test -race -covermode=atomic -coverpkg=./... -coverprofile=coverage/unit.out ./... - - name: coverage threshold gate (.testcoverage.yml) - run: go run github.com/vladopajic/go-test-coverage/v2@v2.18.9 --config=.testcoverage.yml - - govulncheck: - name: govulncheck - runs-on: ubuntu-latest - timeout-minutes: 15 - steps: - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 - with: - go-version: "1.27" - check-latest: true - - name: govulncheck - run: go run golang.org/x/vuln/cmd/govulncheck@v1.9.0 ./... - - image: - name: image build - runs-on: ubuntu-latest - timeout-minutes: 20 - steps: - # The Dockerfile expects the Gameplane repository root as build context - # (it copies mcp-server/...), so check this repo out under that name. - - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - with: - path: mcp-server - - name: docker build - run: docker build -f mcp-server/Dockerfile -t mcp-server:ci . + ci: + uses: GameplanePanel/Gameplane/.github/workflows/go-component.yaml@a9195f596eb0d36776767b691bbdd8f5962fa394 # master + with: + # This repo is the mcp-server/ submodule in Gameplane; the Dockerfile copies mcp-server/... + path: mcp-server diff --git a/.golangci.yml b/.golangci.yml deleted file mode 100644 index e99d8f0..0000000 --- a/.golangci.yml +++ /dev/null @@ -1,49 +0,0 @@ -# golangci-lint config, copied from GameplanePanel/Gameplane .golangci.yml -# (shared linters and settings; path exclusions for other Gameplane modules dropped). -version: "2" - -run: - timeout: 5m - tests: true - -linters: - default: none - enable: - - bodyclose # catches unclosed http.Response.Body leaks - - errcheck # flags ignored error returns - - gosec # security-focused static analysis (CWEs, hardcoded creds, etc.) - - govet # stdlib vet - - ineffassign # dead assignments - - staticcheck # broad correctness checks - - unused # dead code - - misspell - - revive # replaces golint - - unparam # unused function parameters - - nilerr # "return nil" where err should be returned - - noctx # http.Request without context - - errorlint # errors.Is / errors.As usage - - contextcheck # functions that should take context but don't - - settings: - gosec: - # Exclude noisy rules that don't map to the codebase's threat model: - # - G104: "Errors unhandled" — errcheck covers this more precisely. - excludes: [G104] - errcheck: - check-type-assertions: true - check-blank: false - - exclusions: - rules: - # Tests often ignore errors deliberately in setup. Keep loud elsewhere. - - path: _test\.go - linters: [errcheck, gosec, unparam] - -formatters: - enable: - - gofmt - - goimports - -issues: - max-same-issues: 20 - max-issues-per-linter: 50 From 47314e9cd30fecb597d9a8f97d16cdb768d0f88b Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 17 Nov 2026 00:34:46 +0000 Subject: [PATCH 2/2] ci: pin the shared workflow to its hadolint fix Co-Authored-By: Claude Opus 5.5 Signed-off-by: Claude --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 25779e0..8943001 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -20,7 +20,7 @@ concurrency: jobs: ci: - uses: GameplanePanel/Gameplane/.github/workflows/go-component.yaml@a9195f596eb0d36776767b691bbdd8f5962fa394 # master + uses: GameplanePanel/Gameplane/.github/workflows/go-component.yaml@783aefb67b0744eaf8d0ee51cb10d94ae9739fd6 # master with: # This repo is the mcp-server/ submodule in Gameplane; the Dockerfile copies mcp-server/... path: mcp-server