@@ -38,11 +38,19 @@ jobs:
3838 ${{ runner.os }}-pnpm-store-
3939
4040 - name : Install dependencies
41- run : pnpm install --frozen-lockfile
41+ run : pnpm install --no- frozen-lockfile
4242
4343 - name : Run Lighthouse CI
4444 run : pnpm lighthouse:ci
4545
46+ - name : Upload Lighthouse HTML reports
47+ uses : actions/upload-artifact@v4
48+ if : always()
49+ with :
50+ name : lighthouse-html-reports
51+ path : lighthouse-reports/
52+ retention-days : 30
53+
4654 - name : Upload Lighthouse results
4755 uses : actions/upload-artifact@v4
4856 if : always()
5159 path : .lighthouseci/
5260 retention-days : 30
5361
54- - name : Comment PR with Lighthouse results
62+ - name : Comment PR with Korean Lighthouse results
5563 if : github.event_name == 'pull_request'
5664 uses : actions/github-script@v7
5765 with :
@@ -64,19 +72,45 @@ jobs:
6472 if (fs.existsSync(resultsPath)) {
6573 const results = JSON.parse(fs.readFileSync(resultsPath, 'utf8'));
6674
67- let comment = '## 🚀 Lighthouse CI Results \n\n';
75+ let comment = '## �� Lighthouse CI 성능 테스트 결과 \n\n';
6876
6977 if (results.length === 0) {
70- comment += '✅ All Lighthouse checks passed !\n';
78+ comment += '✅ 모든 Lighthouse 검사가 통과했습니다 !\n';
7179 } else {
72- comment += '⚠️ Some Lighthouse checks failed:\n\n';
80+ comment += '⚠️ 일부 Lighthouse 검사에서 문제가 발견되었습니다:\n\n';
81+
82+ // 한글 메시지 매핑
83+ const koreanMessages = {
84+ 'largest-contentful-paint': '가장 큰 콘텐츠가 표시되는 시간 (LCP)',
85+ 'first-contentful-paint': '첫 번째 콘텐츠가 표시되는 시간 (FCP)',
86+ 'cumulative-layout-shift': '누적 레이아웃 이동 (CLS)',
87+ 'total-blocking-time': '총 차단 시간 (TBT)',
88+ 'categories:performance': '성능 점수',
89+ 'categories:accessibility': '접근성 점수',
90+ 'categories:seo': 'SEO 점수',
91+ 'categories:best-practices': '모범 사례 점수'
92+ };
93+
7394 results.forEach(result => {
7495 const status = result.passed ? '✅' : '❌';
75- comment += `${status} **${result.auditTitle}**: ${result.actual}ms (기준: ${result.expected}ms)\n`;
96+ const koreanTitle = koreanMessages[result.auditId] || result.auditTitle;
97+ const value = result.auditId.includes('categories:') ?
98+ `${(result.actual * 100).toFixed(0)}점` :
99+ `${result.actual}ms`;
100+ const expected = result.auditId.includes('categories:') ?
101+ `${(result.expected * 100).toFixed(0)}점 이상` :
102+ `${result.expected}ms 이하`;
103+
104+ comment += `${status} **${koreanTitle}**: ${value} (기준: ${expected})\n`;
76105 });
77106 }
78107
79- comment += '\n📊 [View detailed report](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})';
108+ comment += '\n📊 [상세 보고서 다운로드](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }})';
109+ comment += '\n\n�� **성능 개선 권장사항**:';
110+ comment += '\n- 이미지 최적화 (WebP 포맷, 적절한 크기)';
111+ comment += '\n- 폰트 사전 로드 및 최적화';
112+ comment += '\n- 중요 리소스 사전 로드';
113+ comment += '\n- CDN 사용 및 캐싱 개선';
80114
81115 github.rest.issues.createComment({
82116 issue_number: context.issue.number,
0 commit comments