Skip to content

Commit 78b8821

Browse files
committed
ci: CI matrix에 design-system 추가하고 결과 표에 컬럼 노출
1 parent 22abe86 commit 78b8821

2 files changed

Lines changed: 36 additions & 16 deletions

File tree

.github/workflows/frontend-ci.yml

Lines changed: 35 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,13 @@ jobs:
6262
strategy:
6363
fail-fast: false
6464
matrix:
65-
app: [web, admin]
65+
include:
66+
- app: web
67+
filter: web
68+
- app: admin
69+
filter: admin
70+
- app: design-system
71+
filter: '@muneo/design-system'
6672

6773
steps:
6874
- name: Checkout code
@@ -90,22 +96,22 @@ jobs:
9096
- name: Type check
9197
id: type-check
9298
continue-on-error: true
93-
run: pnpm turbo type-check --filter=${{ matrix.app }}
99+
run: pnpm turbo type-check --filter=${{ matrix.filter }}
94100

95101
- name: Lint check
96102
id: lint
97103
continue-on-error: true
98-
run: pnpm turbo lint --filter=${{ matrix.app }}
104+
run: pnpm turbo lint --filter=${{ matrix.filter }}
99105

100106
- name: Run tests
101107
id: test
102108
continue-on-error: true
103-
run: pnpm turbo test --filter=${{ matrix.app }}
109+
run: pnpm turbo test --filter=${{ matrix.filter }}
104110

105111
- name: Build
106112
id: build
107113
continue-on-error: true
108-
run: pnpm turbo build --filter=${{ matrix.app }}
114+
run: pnpm turbo build --filter=${{ matrix.filter }}
109115

110116
- name: Write CI result
111117
if: always()
@@ -203,27 +209,40 @@ jobs:
203209
return JSON.parse(fs.readFileSync(filePath, 'utf8'));
204210
};
205211
206-
const icon = (status) => status === 'success' ? '✅' : status === 'skipped' ? '⏭️' : '❌';
207-
const label = (status) => status === 'success' ? '통과' : status === 'skipped' ? '스킵' : '실패';
212+
const icon = (status) => {
213+
if (status === 'success') return '✅';
214+
if (status === 'skipped') return '⏭️';
215+
if (status === 'not-applicable') return '➖';
216+
return '❌';
217+
};
218+
const label = (status) => {
219+
if (status === 'success') return '통과';
220+
if (status === 'skipped') return '스킵';
221+
if (status === 'not-applicable') return '해당 없음';
222+
return '실패';
223+
};
208224
209225
const formatResult = getStepResult(formatJob, 'Format check');
210226
const webResult = readAppResult('web');
211227
const adminResult = readAppResult('admin');
228+
const dsResult = readAppResult('design-system');
229+
// 디자인 시스템은 라이브러리라 build 단계가 의도적으로 없음
230+
dsResult.build = 'not-applicable';
212231
213232
const rows = [
214-
['Type', webResult.typeCheck, adminResult.typeCheck],
215-
['Prettier', formatResult, formatResult],
216-
['Lint', webResult.lint, adminResult.lint],
217-
['tests', webResult.test, adminResult.test],
218-
['Build', webResult.build, adminResult.build],
233+
['Type', webResult.typeCheck, adminResult.typeCheck, dsResult.typeCheck],
234+
['Prettier', formatResult, formatResult, formatResult],
235+
['Lint', webResult.lint, adminResult.lint, dsResult.lint],
236+
['tests', webResult.test, adminResult.test, dsResult.test],
237+
['Build', webResult.build, adminResult.build, dsResult.build],
219238
];
220239
221240
let comment = '## 🔍 CI 검증 결과\n\n';
222-
comment += '| 검증 항목 | web | admin |\n';
223-
comment += '|-----------|-----|-------|\n';
241+
comment += '| 검증 항목 | web | admin | design-system |\n';
242+
comment += '|-----------|-----|-------|---------------|\n';
224243
225-
for (const [name, webStatus, adminStatus] of rows) {
226-
comment += `| **${name}** | ${icon(webStatus)} ${label(webStatus)} | ${icon(adminStatus)} ${label(adminStatus)} |\n`;
244+
for (const [name, webStatus, adminStatus, dsStatus] of rows) {
245+
comment += `| **${name}** | ${icon(webStatus)} ${label(webStatus)} | ${icon(adminStatus)} ${label(adminStatus)} | ${icon(dsStatus)} ${label(dsStatus)} |\n`;
227246
}
228247
229248
try {

packages/design-system/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
},
1515
"scripts": {
1616
"lint": "eslint .",
17+
"type-check": "tsc --noEmit",
1718
"test": "vitest run",
1819
"test:watch": "vitest",
1920
"build:icons": "tsx scripts/build-icons.ts",

0 commit comments

Comments
 (0)