Fix/peer review main #460
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # CI: PR에서 품질 체크(린트/타입/빌드/스토리북/보안) | |
| name: CI | |
| # 트리거: develop/main 대상으로 열리는 PR에서 실행 | |
| on: | |
| pull_request: | |
| branches: | |
| - develop | |
| - main | |
| - sprint2 | |
| jobs: | |
| # ESLint로 코드 스타일/버그 패턴 검사(경고를 실패로 취급) | |
| # 실패 시: yarn lint:fix | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Lint | |
| run: yarn lint | |
| # TypeScript 컴파일러로 타입 체크(빌드 없이 타입만 검증) | |
| typecheck: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Type Check | |
| run: yarn typecheck | |
| # Prettier로 코드 포맷 검사(형식 불일치 시 실패) | |
| # 실패 시: yarn prettier:fix | |
| prettier: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Prettier Check | |
| run: yarn prettier | |
| # Next.js 프로덕션 빌드(정적 분석 및 페이지 최적화 포함) | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Build | |
| run: yarn build | |
| # Storybook 정적 빌드(UI 카탈로그가 깨지지 않는지 확인) | |
| storybook: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Build Storybook | |
| run: yarn build-storybook | |
| # 보안 감사: 고위험 이상의 취약점 리포트(현재는 비차단) | |
| # 실패로 처리하려면 '|| true'를 제거하세요. | |
| security: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'yarn' | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Security Audit | |
| run: yarn audit --level high || true |