Skip to content

ci: add Go test job (skips when go.mod absent)#89

Merged
couragehong merged 3 commits intomainfrom
yg/ci-go-test-job
Apr 27, 2026
Merged

ci: add Go test job (skips when go.mod absent)#89
couragehong merged 3 commits intomainfrom
yg/ci-go-test-job

Conversation

@couragehong
Copy link
Copy Markdown
Contributor

@couragehong couragehong commented Apr 27, 2026

Summary

  • What changed: pr-tests.ymlrun-go-tests job 을 기존 run-tests (Python) 와 parallel 하게 추가. checkout 후 go.mod 존재 여부를 step 안에서 검사 (detect_go.outputs.has_go) — 있으면 actions/setup-go@v5 (go-version-file: 'go.mod', cache on) + 다음 4 step:

    • gofmt (unformatted 파일 있으면 fail)
    • go vet ./...
    • go test -race ./...

    go.mod 없으면 silent skip + ::notice:: 로 actions UI 에 한 줄 남김.

  • Why: PR test(go): MCP tool registration + shutdown helper coverage #87 에서 추가된 Go 테스트 (internal/mcp/register_test.go, cmd/rune-mcp/main_test.go) 가 매 PR 마다 자동 실행되도록 + 향후 어떤 Go 코드 변경도 회귀 가드되도록. lint (gofmt + vet) + race detector 까지 포함해 첫 Go CI 부터 적정 수준 가드.

    Migration 기간이라 Python-only 브랜치도 공존 — go.mod 가 main 에 없는 동안 (PR feat(go): Phase A — MCP boot (handshake + tools/list + 8 stub tools) #86 머지 전) Python PR 이 깨지면 안 되므로 silent-skip 가드.

  • Scope:

    • ✅ Go 코드 있는 PR: gofmtgo vet ./...go test -race ./... 자동 실행 (빌드 + 정적 분석 + 테스트 + 데이터 레이스 검증)
    • ✅ Python-only PR: skip (silent — 노이즈 0)
    • ✅ 실패 시 GitHub check 빨간 ❌ (사용자 요청대로 댓글 안 달기)
    • ✅ 통과 시 silent (PR ci: suppress PR comment when all tests pass (skips OK) #88 정책과 일관)
    • ❌ 변경된 Go 파일만 골라 테스트 (go test ./changed-pkgs) 도 미포함 — 현재 테스트 풀 작아서 전체 도는 게 단순

참고: yg/go-runed-migration → main 머지 시점에 새 CI 가 첫 적용됨. 그 시점에 unformatted 파일이 있으면 gofmt -w . 한 번 cleanup 필요할 수 있음 (현재 9 파일 unformatted 확인됨).

@heeyeon01
Copy link
Copy Markdown
Contributor

heeyeon01 commented Apr 27, 2026

✅ All tests passed

Ran on commit 4765a9e

Full Test Results

366 passed, 0 failed, 2 skipped (368 total) — See CI logs

Result Test
⏭️ SKIPPED agents/tests/test_detector.py::TestPatternMatching::test_real_pattern_matching
⏭️ SKIPPED (collection) mcp/tests/test_vault_direct.py:33

@esifea
Copy link
Copy Markdown
Contributor

esifea commented Apr 27, 2026

I think there is no risk for adding go vet / gofmt / race detector 는 미포함 — 필요 생기면 follow-up in this PR

Comment thread .github/workflows/pr-tests.yml Outdated
@couragehong couragehong merged commit 00a3e5b into main Apr 27, 2026
2 checks passed
@couragehong couragehong deleted the yg/ci-go-test-job branch April 27, 2026 06:39
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.

3 participants