Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
7a43c4d
chore: 기존 storybook 파일 제거
swgivenchy Jan 5, 2026
85ba0ef
feat: clsx와 tailwind-merge를 사용하는 tailwindCSS 합성 유틸 함수인 cn함수 생성
swgivenchy Jan 5, 2026
58e1609
chore: storybook에서 tailwindCSS가 적용되도록 globals.css 임포트
swgivenchy Jan 5, 2026
a6368fe
feat(99): button 컴포넌트 생성 및 storybook 코드 작성
swgivenchy Jan 5, 2026
adc28a7
feat(99): shadcn/ui의 manual install 문서에 맞춰 globals.css 수정 및 라이브러리 설치
swgivenchy Jan 5, 2026
510147d
feat(99): badge 컴포넌트 생성 및 storybook 코드 작성
swgivenchy Jan 5, 2026
01c0fcf
feat(99): shadcn/ui 컴포넌트에 필요한 라이브러리 종합 설치
swgivenchy Jan 5, 2026
b836f60
feat(99): accordion, input, popover, progress 컴포넌트 생성 및 storybook 코드 작성
swgivenchy Jan 5, 2026
8a14b7c
chore: review 할당을 위한 codeowners 파일 추가
swgivenchy Jan 5, 2026
14e196a
chore: playwright 설치
swgivenchy Jan 5, 2026
0b30f5e
chore: vitest 설치
swgivenchy Jan 5, 2026
c64c0fd
chore: storybook with playwright 제거 및 관련 라이브러리 제거
swgivenchy Jan 5, 2026
6f90063
chore: unit test, e2e test 명령어 추가 및 unit 테스트 진행시 e2e테스트가 진행되는 버그 수정
swgivenchy Jan 5, 2026
e92388d
chore: FE unit test진행시 test파일이 없어서 테스트가 실패하는 문제 해결을 위한 예시 테스트 파일 작성
swgivenchy Jan 5, 2026
b631808
feat(101): ci.yml을 수정하여 filechanges에 맞춰 해당하는 테스트가 진행되도록 CI 수정
swgivenchy Jan 5, 2026
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
1 change: 1 addition & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* @AYEOOON @kimjihyo @dltnwjd308 @rwaeng @swgivenchy
96 changes: 96 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
pull_request:
branches: [main, develop]

# 같은 PR에 CI 돌던 중 새로운 commit이 오면 이전 CI를 취소하는 부분
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
ci:
name: Lint, Type Check, Build
Expand Down Expand Up @@ -36,7 +41,98 @@ jobs:
- name: Build Check
run: pnpm build

check-changes:
runs-on: ubuntu-latest
outputs:
frontend: ${{ steps.filter.outputs.frontend }}
backend: ${{ steps.filter.outputs.backend }}
storybook: ${{ steps.filter.outputs.storybook }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Check for changes
uses: dorny/paths-filter@v3
id: filter
with:
filters: |
frontend:
- 'apps/web/**'
backend:
- 'apps/api/**'
storybook:
- '**/*.stories.tsx'
- '**/*.stories.ts'

test-frontend:
needs: check-changes
if: needs.check-changes.outputs.frontend == 'true'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

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

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

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

- name: Run Vitest
run: pnpm --filter web test

- name: Install Playwright Browsers
run: pnpm --filter web exec playwright install --with-deps

- name: Run Playwright tests
run: pnpm --filter web test:e2e

- name: Upload Playwright report
uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report
path: apps/web/playwright-report/
retention-days: 30

test-backend:
needs: check-changes
if: needs.check-changes.outputs.backend == 'true'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

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

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

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

- name: Run Jest
run: pnpm --filter api test

test-and-deploy-storybook:
needs: check-changes
if: needs.check-changes.outputs.storybook == 'true'
runs-on: ubuntu-latest

steps:
Expand Down
8 changes: 8 additions & 0 deletions apps/web/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,11 @@ next-env.d.ts

*storybook.log
storybook-static

# Playwright
node_modules/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/playwright/.auth/
1 change: 1 addition & 0 deletions apps/web/.storybook/preview.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import "@/app/globals.css";
import type { Preview } from "@storybook/nextjs-vite";

const preview: Preview = {
Expand Down
7 changes: 0 additions & 7 deletions apps/web/.storybook/vitest.setup.ts

This file was deleted.

18 changes: 18 additions & 0 deletions apps/web/e2e/example.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import { test, expect } from '@playwright/test';

test('has title', async ({ page }) => {
await page.goto('https://playwright.dev/');

// Expect a title "to contain" a substring.
await expect(page).toHaveTitle(/Playwright/);
});

test('get started link', async ({ page }) => {
await page.goto('https://playwright.dev/');

// Click the get started link.
await page.getByRole('link', { name: 'Get started' }).click();

// Expects page to have a heading with the name of Installation.
await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
});
21 changes: 17 additions & 4 deletions apps/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,33 +8,46 @@
"start": "next start",
"lint": "eslint",
"check-types": "tsc --noEmit",
"test": "vitest run",
"test:e2e": "playwright test",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"chromatic": "npx chromatic --project-token=chpt_4cfbab0f11a8be9"
},
"dependencies": {
"@radix-ui/react-accordion": "^1.2.12",
"@radix-ui/react-popover": "^1.1.15",
"@radix-ui/react-progress": "^1.1.8",
"@radix-ui/react-slot": "^1.2.4",
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"lucide-react": "^0.562.0",
"next": "16.1.0",
"react": "19.2.3",
"react-dom": "19.2.3"
"react-dom": "19.2.3",
"tailwind-merge": "^3.4.0",
"tw-animate-css": "^1.4.0"
},
"devDependencies": {
"@chromatic-com/storybook": "^4.1.3",
"@playwright/test": "^1.57.0",
"@storybook/addon-a11y": "^10.1.11",
"@storybook/addon-docs": "^10.1.11",
"@storybook/addon-vitest": "^10.1.11",
"@storybook/nextjs-vite": "^10.1.11",
"@tailwindcss/postcss": "^4",
"@testing-library/dom": "^10.4.1",
"@testing-library/react": "^16.3.1",
"@types/node": "^20",
"@types/react": "^19",
"@types/react-dom": "^19",
"@vitest/browser-playwright": "^4.0.16",
"@vitejs/plugin-react": "^5.1.2",
"@vitest/coverage-v8": "^4.0.16",
"babel-plugin-react-compiler": "1.0.0",
"chromatic": "^13.3.4",
"eslint": "^9",
"eslint-config-next": "16.1.0",
"eslint-plugin-storybook": "^10.1.11",
"playwright": "^1.57.0",
"jsdom": "^27.4.0",
"storybook": "^10.1.11",
"tailwindcss": "^4",
"typescript": "^5",
Expand Down
79 changes: 79 additions & 0 deletions apps/web/playwright.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
import { defineConfig, devices } from '@playwright/test';

/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// import dotenv from 'dotenv';
// import path from 'path';
// dotenv.config({ path: path.resolve(__dirname, '.env') });

/**
* See https://playwright.dev/docs/test-configuration.
*/
export default defineConfig({
testDir: './e2e',
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Base URL to use in actions like `await page.goto('')`. */
// baseURL: 'http://localhost:3000',

/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},

/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: { ...devices['Desktop Chrome'] },
},

{
name: 'firefox',
use: { ...devices['Desktop Firefox'] },
},

{
name: 'webkit',
use: { ...devices['Desktop Safari'] },
},

/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: { ...devices['Pixel 5'] },
// },
// {
// name: 'Mobile Safari',
// use: { ...devices['iPhone 12'] },
// },

/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: { ...devices['Desktop Edge'], channel: 'msedge' },
// },
// {
// name: 'Google Chrome',
// use: { ...devices['Desktop Chrome'], channel: 'chrome' },
// },
],

/* Run your local dev server before starting the tests */
// webServer: {
// command: 'npm run start',
// url: 'http://localhost:3000',
// reuseExistingServer: !process.env.CI,
// },
});
Loading
Loading