Skip to content

🎨 Feat: λŒ€μ‹œλ³΄λ“œ 상세 νŽ˜μ΄μ§€ - μŠ€μΌˆλ ˆν†€ UI 적용 #138

🎨 Feat: λŒ€μ‹œλ³΄λ“œ 상세 νŽ˜μ΄μ§€ - μŠ€μΌˆλ ˆν†€ UI 적용

🎨 Feat: λŒ€μ‹œλ³΄λ“œ 상세 νŽ˜μ΄μ§€ - μŠ€μΌˆλ ˆν†€ UI 적용 #138

Workflow file for this run

name: CI Pipeline
on:
pull_request:
branches: [develop, main]
push:
branches: [develop, main]
jobs:
eslint-check:
runs-on: self-hosted
timeout-minutes: 2
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 2 # HEAD와 베이슀 브랜치 νžˆμŠ€ν† λ¦¬ 확보
- name: Lightning fast lint check
run: |
echo "⚑ Quick lint check..."
# λ©”λͺ¨λ¦¬ μƒνƒœ 사전 체크
AVAILABLE_MB=$(free -m | grep ^Mem | awk '{print $7}')
echo "πŸ’Ύ Available memory: ${AVAILABLE_MB}MB"
if [ "${{ github.event_name }}" = "pull_request" ]; then
# PR인 경우: 베이슀 λΈŒλžœμΉ˜μ™€ 비ꡐ
BASE_BRANCH="${{ github.base_ref }}"
git fetch origin $BASE_BRANCH --depth=1
ALL_CHANGED=$(git diff --name-only origin/$BASE_BRANCH...HEAD -- '*.ts' '*.tsx' '*.js' '*.jsx')
FILE_COUNT=$(echo "$ALL_CHANGED" | wc -w)
echo "πŸ“Š Base: $BASE_BRANCH, Changed files: $FILE_COUNT"
# πŸ›‘οΈ λ©”λͺ¨λ¦¬ 기반 μ•ˆμ „μž₯치
if [ "$AVAILABLE_MB" -lt 200 ]; then
MAX_FILES=10
echo "⚠️ Low memory mode: checking $MAX_FILES files only"
elif [ "$FILE_COUNT" -gt 30 ]; then
MAX_FILES=30
echo "⚠️ Large PR detected: checking first $MAX_FILES files for memory safety"
echo "ℹ️ Note: Full project will be built during deployment"
else
MAX_FILES="$FILE_COUNT"
echo "βœ… Normal mode: checking all $FILE_COUNT files"
fi
CHANGED_FILES=$(echo "$ALL_CHANGED" | head -$MAX_FILES)
else
# Push인 경우: 이전 컀밋과 비ꡐ
echo "πŸ” Push event detected"
if git rev-parse --verify HEAD~1 >/dev/null 2>&1; then
CHANGED_FILES=$(git diff --name-only HEAD~1 -- '*.ts' '*.tsx' '*.js' '*.jsx')
echo "πŸ“ Checking files changed since last commit"
else
echo "πŸ” First commit or shallow clone, checking recent files"
CHANGED_FILES=$(find . -name "*.ts" -o -name "*.tsx" -o -name "*.js" -o -name "*.jsx" | grep -v node_modules | head -5)
fi
fi
# 변경사항 μ—†μœΌλ©΄ μ¦‰μ‹œ μ’…λ£Œ
if [ -z "$CHANGED_FILES" ]; then
echo "βœ… No JS/TS files to check"
exit 0
fi
# μ΅œμ’… μ‹€ν–‰ 정보
FINAL_COUNT=$(echo $CHANGED_FILES | wc -w)
ESTIMATED_MB=$((FINAL_COUNT * 2))
echo "🧠 Checking $FINAL_COUNT files (~${ESTIMATED_MB}MB estimated)"
echo "πŸ“ Files: $CHANGED_FILES"
# κΈ€λ‘œλ²Œ ESLint μ‹€ν–‰
npx eslint $CHANGED_FILES
echo "βœ… Lint check passed!"