Skip to content

chore(ci): PR 단위 Bazel 빌드/테스트 자동화 #93 - #95

Open
tlgms wants to merge 2 commits into
developfrom
chore/93-ci-pipeline
Open

chore(ci): PR 단위 Bazel 빌드/테스트 자동화 #93#95
tlgms wants to merge 2 commits into
developfrom
chore/93-ci-pipeline

Conversation

@tlgms

@tlgms tlgms commented Sep 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • main / develop 대상 PR과 push에서 bazel build //...bazel test //... 를 실행하는 CI 워크플로를 추가합니다.
  • 현재 저장소에는 커밋 메시지 검사(commitlint.yaml)와 수동 이미지 빌드(deploy.yml, workflow_dispatch 전용)만 있고, 코드가 빌드되고 테스트가 통과하는지 검증하는 워크플로가 없었습니다. 7개 서비스에 45개 테스트 타깃이 있지만 PR에서 아무도 실행하지 않는 상태였습니다.

Related Issue

Scope

  • 영향 범위: .github/workflows/ci.yml 신규 파일 1개
  • 애플리케이션 코드 및 기존 워크플로 변경 없음

Change Type

  • Refactor
  • Dependency update
  • Config / infra change
  • Tooling / CI

Risk

  • 런타임 동작에 영향 없습니다. 워크플로 파일만 추가하며 애플리케이션 코드는 건드리지 않습니다.
  • 첫 실행은 Bazel 캐시가 비어 있어 다소 오래 걸리고, 이후 실행부터 disk / repository / bazelisk 캐시가 적용됩니다.

검증

로컬에서 origin/develop 기준으로 CI가 실행할 명령을 그대로 돌려 확인했습니다.

bazel build //...                    → exit 0
bazel test //... (제외 3개 적용)      → exit 0, 42 tests pass

짚어둘 점

1. 실패 중인 테스트 3개를 제외했습니다

bazel test //... 전체 실행 시 아래 3개 타깃이 실패합니다. 이 PR 이전부터 실패하던 것이며, CI를 처음부터 red 상태로 두면 아무도 보지 않게 되므로 일단 제외하고 #94 로 추적합니다. 수정되면 ci.yml의 제외 목록 3줄을 지우면 됩니다.

타깃 원인
gateway-bootstrap:test base application.yaml이 기본값 없이 ${GATEWAY_RESILIENCE_STATE_STORE} 참조 (application-dev.yaml에만 기본값 존재)
identity-bootstrap:test 동일 패턴 — ${AUTH_PASSWORD_RESET_ENABLED}
gateway-adapter-in:test 5개 실패: 3개는 실제 Redis 필요, 2개는 라우팅 404

앞의 2개는 "운영에서 환경변수 누락 시 fail-fast" 의도일 수 있어 기본값 추가 대신 테스트를 고치는 게 맞을 수도 있습니다. 설계 의도를 아는 분의 판단이 필요해 이 PR 범위에서는 건드리지 않았습니다.

2. 브랜치 보호 설정이 별도로 필요합니다

CI가 실제 머지 게이트로 동작하려면 저장소 Settings에서 build-test 를 required status check로 등록해야 합니다. 코드로는 반영할 수 없는 부분이라 별도로 설정 부탁드립니다.

3. CD는 이 PR 범위 밖입니다

배포 자동화는 #79 에서 다루고 있어 deploy.yml은 건드리지 않았습니다. 다만 현재 :latest 태그만 푸시하고 있어 롤백과 추적이 불가능하니, #79 진행 시 커밋 SHA 태그 추가를 함께 고려하면 좋겠습니다.

Checklist

  • No functional changes
  • CI / build verified

🤖 Generated with Claude Code

main/develop 대상 PR과 push에서 bazel build //... 와 bazel test //... 를
실행하는 CI 워크플로를 추가한다.

- bazel-contrib/setup-bazel로 bazelisk 설치 및 캐시 구성
  (.bazelversion 8.5.1을 그대로 사용해 로컬과 동일한 버전으로 실행)
- concurrency로 동일 ref의 이전 실행을 취소해 러너 사용량 절감
- 기존에 실패하던 3개 타깃은 제외하고 #94로 추적

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Sep 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are limited based on label configuration.

🏷️ Required labels (at least one) (1)
  • ready-for-review
🚫 Excluded labels (none allowed) (2)
  • wip
  • do-not-review

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Team

Run ID: dad5c831-7bce-4498-8ba2-e625c5e95b0c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

identity-adapter-out:test가 CI에서 실패하여 제외 목록에 추가한다.

Testcontainers로 mysql:8.4를 띄우는 테스트인데, macOS의 Bazel 샌드박스에서는
Docker 소켓이 보이지 않아 assumeTrue로 조용히 skip 되어 그동안 드러나지 않았다.
Docker가 있는 CI에서는 실제로 실행되면서 JDBC URL에 allowPublicKeyRetrieval이
없어 caching_sha2_password 인증에 실패한다. 원인은 #94에 기록했다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.

CI 파이프라인 구축: PR 단위 Bazel 빌드/테스트 자동화

2 participants