Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: CI - Code Quality Check
on:
push:
branches:
- 'feat/**'
- "feat/**"

pull_request:
branches:
- develop
Expand Down Expand Up @@ -32,18 +33,18 @@ jobs:

# 2. pnpm 설정
- name: Setup pnpm
uses: pnpm.action-setup@v4
uses: pnpm/action-setup@v4

# 3. Node.js 설정
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
cache: "pnpm"

# 4. 의존성 설치
- name: Install dependencies
run: pnpm install
run: pnpm install --frozen-lockfile

# 5. 코드 포맷팅 체크
- name: Check code formatting
Expand All @@ -62,9 +63,10 @@ jobs:
run: pnpm run build
env:
# 빌드 테스트용 더미 환경변수
NEXT_PUBLIC_SUPABASE_URL: 'https://dummy.supabase.co'
NEXT_PUBLIC_SUPABASE_ANON_KEY: 'dummy-key-for-build-test'
NEXT_PUBLIC_SUPABASE_URL: "https://dummy.supabase.co"
NEXT_PUBLIC_SUPABASE_ANON_KEY: "dummy-key-for-build-test"


# 9. 성공 시 체크마크 출력
- name: All checks passed
run: echo "모든 코드 품질 검사를 통과했습니다!"
run: echo "모든 코드 품질 검사를 통과했습니다!"
83 changes: 83 additions & 0 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Develop - Integration Test

on:
push:
branches:
- develop
pull_request:
branches:
- develop

# 동시 실행 제한
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

env:
# Develop 환경 변수 (GitHub Secrets 사용)
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.DEV_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.DEV_SUPABASE_ANON_KEY }}

jobs:
integration-test:
name: Integration Test
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

steps:
# 1. 코드 체크아웃
- name: Checkout repository
uses: actions/checkout@v4

# 2. pnpm 설정
- name: Setup pnpm
uses: pnpm/action-setup@v4

# 3. Node.js 설정
- name: Setup Node.js ${{ matrix.node-version}}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "pnpm"

# 4. 의존성 설치
- name: Install dependencies
run: pnpm install --frozen-lockfile

# 5. 코드 품질 검사
- name: Code formatting check
run: pnpm run format:check

- name: Lint check
run: pnpm run lint

- name: Type check
run: pnpm run type-check

# 6. 실제 환경변수로 빌드 테스트
- name: Build for develop
run: pnpm run build

# # 7. Jest 테스트 (나중에 활성화)
# - name: Run Tests
# run: pnpm run test

# 8. E2E 테스트 (Playwright - 나중에 활성화)
# - name: E2E Tests
# run: pnpm exec playwright test

# 9. 빌드 결과물 업로드 (디버깅용)
- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: failure()
with:
name: build-output
path: .next/
retention-days: 1

# 10. 성공 알림
- name: Integration test passed
run: echo "Develop 브랜치 통합 테스트 완료!"
17 changes: 9 additions & 8 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,12 @@ jobs:

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.2.0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'
cache: "pnpm"

- name: Install dependencies
run: pnpm install --frozen-lockfile
Expand Down Expand Up @@ -83,19 +81,21 @@ jobs:
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/actions-setup@v4
uses: pnpm/action-setup@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'pnpm'

cache: "pnpm"
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Build for production
run: pnpm run build
env:
NEXT_PUBLIC_SUPABASE_URL: ${{ secrets.PROD_SUPABASE_URL }}
NEXT_PUBLIC_SUPABASE_ANON_KEY: ${{ secrets.PROD_SUPABASE_ANON_KEY }}

# Vercel 배포 예시 (사용하는 플랫폼에 맞게 수정)
- name: Deploy to Vercel
Expand All @@ -104,11 +104,12 @@ jobs:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # TODO: 나중에 배포 후 입력
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} # TODO: 나중에 배포 후 입력
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }} # TODO: 나중에 배포 후 입력
vercel-args: '--prod'
vercel-args: "--prod"


# 배포 성공 알림 (선택사항)
- name: Deployment success notification
run: |
echo "프로덕션 배포 완료!"
echo "배포 시간: ${date}"
echo "커밋: ${{ github.sha}}"
echo "커밋: ${{ github.sha}}"
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@
"dev": "next dev --turbopack",
"build": "next build --turbopack",
"start": "next start",
"lint": "eslint"
"lint": "eslint",
"lint:fix": "eslint --fix",
"type-check": "tsc --noEmit",
"test": "jest",
"test:watch": "jest --watch",
"test:coverage": "jest --coverage",
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"dependencies": {
"@hookform/resolvers": "^5.2.1",
Expand Down
Loading
Loading