docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
@@ -0,0 +1,168 @@
|
||||
---
|
||||
id: wiki-2026-0508-continuous-integration-ci
|
||||
title: Continuous Integration (CI)
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [CI, Continuous Integration, 지속적 통합]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.92
|
||||
verification_status: applied
|
||||
tags: [ci, devops, automation, github-actions]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: yaml
|
||||
framework: github-actions
|
||||
---
|
||||
|
||||
# Continuous Integration (CI)
|
||||
|
||||
## 매 한 줄
|
||||
> **"매 push마다 build + test, fast feedback"**. Grady Booch (1991) 가 제안, Martin Fowler 가 대중화. 2026 현재 GitHub Actions / GitLab CI 가 표준이며, AI-assisted PR review (Claude Opus 4.7) 와 결합되어 매 commit 검증 cycle 이 분 단위로 압축됨.
|
||||
|
||||
## 매 핵심
|
||||
|
||||
### 매 원칙
|
||||
- **Mainline integration 빈번**: 매 developer 매일 main 에 merge.
|
||||
- **Automated build**: 매 commit trigger build pipeline.
|
||||
- **Automated test**: unit + integration + lint 매 자동 실행.
|
||||
- **Fast feedback**: <10 min 안에 결과. 길어지면 dev 매 ignore.
|
||||
- **Single source of truth**: 매 single repo, single mainline.
|
||||
|
||||
### 매 stages
|
||||
- **Lint** (10s) — eslint, ruff, gofmt.
|
||||
- **Unit test** (1-3 min) — vitest, pytest, go test.
|
||||
- **Integration test** (3-8 min) — testcontainers, ephemeral DB.
|
||||
- **Build artifact** (1-2 min) — docker image, npm tarball.
|
||||
- **Static analysis** (parallel) — SonarQube, Snyk, CodeQL.
|
||||
|
||||
### 매 응용
|
||||
1. SaaS product 매 trunk-based development.
|
||||
2. Open-source project 매 PR validation.
|
||||
3. Monorepo 매 affected-only build (Turborepo, Nx).
|
||||
|
||||
## 💻 패턴
|
||||
|
||||
### Modern GitHub Actions (2026)
|
||||
```yaml
|
||||
name: CI
|
||||
on:
|
||||
push: { branches: [main] }
|
||||
pull_request:
|
||||
merge_group:
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/setup-node@v5
|
||||
with: { node-version: '22', cache: 'pnpm' }
|
||||
- run: pnpm install --frozen-lockfile
|
||||
- run: pnpm lint
|
||||
- run: pnpm test --coverage
|
||||
- uses: codecov/codecov-action@v5
|
||||
```
|
||||
|
||||
### Matrix build
|
||||
```yaml
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-24.04, macos-14, windows-2022]
|
||||
node: [20, 22]
|
||||
runs-on: ${{ matrix.os }}
|
||||
```
|
||||
|
||||
### Affected-only (monorepo)
|
||||
```yaml
|
||||
- run: pnpm exec turbo run test --filter=...[origin/main]
|
||||
```
|
||||
|
||||
### Reusable workflow
|
||||
```yaml
|
||||
# .github/workflows/reusable-test.yml
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
node-version: { type: string, default: '22' }
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-24.04
|
||||
steps: [ ... ]
|
||||
```
|
||||
|
||||
### Container-based test (testcontainers)
|
||||
```python
|
||||
# pytest with ephemeral postgres
|
||||
from testcontainers.postgres import PostgresContainer
|
||||
|
||||
def test_repo():
|
||||
with PostgresContainer("postgres:17") as pg:
|
||||
url = pg.get_connection_url()
|
||||
# run integration test against real DB
|
||||
```
|
||||
|
||||
### Cache layers (docker buildx)
|
||||
```yaml
|
||||
- uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: .
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
tags: ghcr.io/org/app:${{ github.sha }}
|
||||
```
|
||||
|
||||
### AI PR review (2026)
|
||||
```yaml
|
||||
- uses: anthropic-experimental/claude-code-action@v1
|
||||
with:
|
||||
api-key: ${{ secrets.ANTHROPIC_API_KEY }}
|
||||
model: claude-opus-4-7
|
||||
review-mode: pr-comment
|
||||
```
|
||||
|
||||
## 매 결정 기준
|
||||
| 상황 | Approach |
|
||||
|---|---|
|
||||
| Open-source GitHub repo | GitHub Actions |
|
||||
| Self-hosted, private | GitLab CI / Drone |
|
||||
| Monorepo | Turborepo + affected-only |
|
||||
| Polyglot, complex | Buildkite / Bazel |
|
||||
| Mobile (iOS/Android) | Bitrise / Xcode Cloud |
|
||||
|
||||
**기본값**: GitHub Actions + concurrency cancel + matrix + cache.
|
||||
|
||||
## 🔗 Graph
|
||||
- 부모: [[DevOps]]
|
||||
- 변형: [[Continuous Deployment]] · [[Trunk-Based Development]]
|
||||
- 응용: [[GitHub Actions]]
|
||||
- Adjacent: [[Test Automation]] · [[Static Analysis]] · [[153_pre-commit과_품질_게이트|Pre-commit Hooks]]
|
||||
|
||||
## 🤖 LLM 활용
|
||||
**언제**: PR diff review, flaky test detection, commit message generation, changelog 생성.
|
||||
**언제 X**: secret-handling pipeline (보안), production deploy gate (deterministic 해야 함).
|
||||
|
||||
## ❌ 안티패턴
|
||||
- **Slow pipeline (>20 min)**: dev 매 ignore, "broken main" 정상화.
|
||||
- **Flaky test 방치**: trust collapse → 매 retry, retry, retry.
|
||||
- **No mainline protection**: 직접 push to main, PR 없음.
|
||||
- **Build on developer machine only**: "works on my machine" 재현.
|
||||
- **Secrets in logs**: env 출력, token leak.
|
||||
|
||||
## 🧪 검증 / 중복
|
||||
- Verified (Fowler 2006 *Continuous Integration* article, GitHub Actions docs 2026).
|
||||
- 신뢰도 A.
|
||||
|
||||
## 🕓 Changelog
|
||||
| 날짜 | 변경 |
|
||||
|---|---|
|
||||
| 2026-05-08 | Phase 1 |
|
||||
| 2026-05-10 | Manual cleanup — full content with modern GitHub Actions patterns |
|
||||
Reference in New Issue
Block a user