Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
b2bff31
#18 ci(fe): fe ci build,lint 체크 git action 설정
KimKyuHoi Jan 22, 2025
2e45573
#18 ci(fe): 스크립트 수정
KimKyuHoi Jan 22, 2025
3ea62f2
#18 ci(fe): src/frontend에 들어갔을경우 pnpm 설치되도록 변경
KimKyuHoi Jan 22, 2025
7c5ff41
#18 ci(fe): c_sharp/src/frontend변화가 일어났을경우에만 작동되도록 수정
KimKyuHoi Jan 22, 2025
22c064d
#18 ci(fe): 임시 조건 제거
KimKyuHoi Jan 22, 2025
502e124
#18 ci(fe): fe 경로 찾기
KimKyuHoi Jan 22, 2025
67807f8
#18 ci(fe): fe 경로 수정
KimKyuHoi Jan 22, 2025
f76090e
#18 build(fe): eslint 버전 호환성 수정하기
KimKyuHoi Jan 22, 2025
3aa3494
#18 ci(fe): build 경로 수정
KimKyuHoi Jan 22, 2025
5dbc755
#18 build(fe): gitignore 수정
KimKyuHoi Jan 22, 2025
cbd24a4
#18 ci(fe): git action내 turbo설치
KimKyuHoi Jan 22, 2025
dec832b
#18 ci(fe): turbo devDependency설치
KimKyuHoi Jan 22, 2025
e3fa680
#18 ci(fe): turbo를 루트 devDependencies로 설치
KimKyuHoi Jan 22, 2025
827da80
#18 ci(fe): 공식문서 ci 가지고 오기
KimKyuHoi Jan 22, 2025
c7c196d
#18 ci(fe): 경로 수정
KimKyuHoi Jan 22, 2025
829832e
#18 ci(fe): ci 경로 수정
KimKyuHoi Jan 22, 2025
d2cfa86
#18 ci(fe): node버전 변경
KimKyuHoi Jan 22, 2025
9b2331c
#18 ci(fe): pnpm 의존성 충돌 해결
KimKyuHoi Jan 22, 2025
3e0ee3c
#18 ci(fe): peer dependency설정
KimKyuHoi Jan 22, 2025
eb420b0
#18 ci(fe): turbo 설치 제거
KimKyuHoi Jan 22, 2025
b304ad7
#18 ci(fe): ci 순서 변경
KimKyuHoi Jan 22, 2025
964243e
#18 ci(fe): ci test
KimKyuHoi Jan 22, 2025
075a457
#18 ci(fe):turbo 설치
KimKyuHoi Jan 22, 2025
3362197
#18 ci(fe): ci 추가
KimKyuHoi Jan 22, 2025
2cdeeb0
#18 ci(fe): pnpm-lock.yaml파일 재설치
KimKyuHoi Jan 22, 2025
928f2b8
#18 ci(fe): prod 제거
KimKyuHoi Jan 22, 2025
e0afc22
#18 build(fe): 내부 eslint 수정
KimKyuHoi Jan 22, 2025
dac138f
#18 ci(fe): 해당 브랜치 및 src/frontend에 변화가 있을 경우에만 ci돌도록 수정
KimKyuHoi Jan 22, 2025
ca9a57e
#18 build(fe): danger js 세팅
KimKyuHoi Jan 22, 2025
8158774
#18 ci(fe): cicd dangerjs 추가 세팅
KimKyuHoi Jan 22, 2025
28365b4
#18 ci(fe): 경로 수정
KimKyuHoi Jan 22, 2025
875f4bd
#18 build(fe): prettier, eslint 설정
KimKyuHoi Jan 22, 2025
12a28f6
#18 build(fe): prettier 적용
KimKyuHoi Jan 22, 2025
74c39b4
#18 build(fe): danger.ts eslint설정
KimKyuHoi Jan 22, 2025
a6e8354
#18 ci(fe): ci 경로 추가 수정
KimKyuHoi Jan 22, 2025
a14914c
#18 ci(fe): ci 파일 수정
KimKyuHoi Jan 22, 2025
3714fdc
#18 ci(fe): fe ci pnpm install 추가
KimKyuHoi Jan 22, 2025
49aef06
#18 ci(fe): pnpm install 추가
KimKyuHoi Jan 22, 2025
67fac80
#18 ci(fe): 해당 브랜치 Push했을때 발생되는 조건문 제거
KimKyuHoi Jan 22, 2025
18ba348
#18 ci(fe): 토큰 권한 확인
KimKyuHoi Jan 22, 2025
9d0f6ae
#18 ci(fe): danger js 스크립트 수정
KimKyuHoi Jan 22, 2025
8bd6e78
#18 ci(fe): dangerJS 삭제
KimKyuHoi Jan 22, 2025
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
121 changes: 121 additions & 0 deletions .github/workflows/fe-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
name: FRONTEND-CI

on:
pull_request:
types: [opened, synchronize, reopened]
branches:
- dev
- main
paths:
- 'src/frontend/**'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
changes:
if: ${{ github.actor != 'l10nbot' }} # Avoid running for 'l10nbot'
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 2

- uses: pnpm/action-setup@v3
with:
version: 8

- uses: actions/cache@v4
id: cache
with:
path: .turbo
key: ${{ runner.os }}-turbo-${{ github.sha }}
restore-keys: |
${{ runner.os }}-turbo-

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

- name: Install pnpm
run: npm install -g pnpm

- name: Install dependencies
run: |
cd src/frontend
pnpm install --strict-peer-dependencies=false --frozen-lockfile
pnpm add turbo --save-dev -w

type-check:
needs: [changes]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8

- name: Typescript Check
run: |
cd src/frontend
pnpm install
pnpm typescript
env:
NODE_OPTIONS: --max-old-space-size=4096

lint:
needs: [changes]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8

- name: Prettier check
run: |
cd src/frontend
pnpm install
pnpm format --check

- name: Lint
run: |
cd src/frontend
pnpm lint

build:
needs: [changes, lint, type-check]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8

- name: Build project
run: |
cd src/frontend
pnpm install
pnpm build
env:
NODE_OPTIONS: --max_old_space_size=4096

- name: Build Storybook
run: |
cd src/frontend
pnpm install
pnpm build-storybook

required:
needs: [changes, lint, type-check, build]
if: always()
runs-on: ubuntu-latest
steps:
- name: fail if conditional jobs failed
if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'skipped') || contains(needs.*.result, 'cancelled')
run: exit 1
47 changes: 47 additions & 0 deletions src/frontend/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Node modules 디렉토리 제외
node_modules/

# 빌드 결과물 제외
dist/
build/

# 환경설정 파일 제외
package.json
turbo.json
.eslintrc.json

# 로그 파일
npm-debug.log

# 프로젝트 루트에서 제외된 다른 파일들
public/

# 기타 설정 파일 제외 (필요시)
*.config.js
*.config.cjs
*.config.mjs

# GitHub 워크플로우 및 VSCode 설정 파일 제외
.github/
.vscode/
.DS_Store
.idea/

# Jest 관련 파일 제외 (필요시)
jest.config.js
jest.setup.js

# TurboRepo 캐시 제외
.turbo/

# ESLint 설정 파일 제외
.eslintrc.json
.eslintignore

# 압축된 자바스크립트 및 CSS 파일 제외
*.min.js
*.min.css

# 포맷팅을 제외할 파일들
.prettierrc
storybook-static
7 changes: 3 additions & 4 deletions src/frontend/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
// This configuration only applies to the package manager root.
/** @type {import("eslint").Linter.Config} */
module.exports = {
ignorePatterns: ["apps/**", "packages/**"],
extends: ["@workspace/eslint-config/library.js"],
parser: "@typescript-eslint/parser",
ignorePatterns: ['apps/**', 'packages/**'],
parser: '@typescript-eslint/parser',
parserOptions: {
project: true,
},
}
};
1 change: 1 addition & 0 deletions src/frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,4 @@ npm-debug.log*
*.pem

*storybook.log
*storybook-static
49 changes: 49 additions & 0 deletions src/frontend/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# Node modules 디렉토리 제외
node_modules/

# 빌드 결과물 제외
dist/
build/

# 환경설정 파일 제외
package.json
turbo.json
.eslintrc.json

# 로그 파일
npm-debug.log

# 프로젝트 루트에서 제외된 다른 파일들
public/

# 기타 설정 파일 제외 (필요시)
*.config.js
*.config.cjs
*.config.mjs

# GitHub 워크플로우 및 VSCode 설정 파일 제외
.github/
.vscode/
.DS_Store
.idea/

# Jest 관련 파일 제외 (필요시)
jest.config.js
jest.setup.js

# TurboRepo 캐시 제외
.turbo/

# ESLint 설정 파일 제외
.eslintrc.json
.eslintignore

# 압축된 자바스크립트 및 CSS 파일 제외
*.min.js
*.min.css

# 포맷팅을 제외할 파일들
.prettierrc
storybook-static

README.md
11 changes: 11 additions & 0 deletions src/frontend/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"semi": true,
"singleQuote": true,
"trailingComma": "all",
"printWidth": 180,
"tabWidth": 2,
"bracketSpacing": true,
"arrowParens": "always",
"endOfLine": "lf",
"singleAttributePerLine": true
}
2 changes: 1 addition & 1 deletion src/frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@ Your `tailwind.config.ts` and `globals.css` are already set up to use the compon
To use the components in your app, import them from the `ui` package.

```tsx
import { Button } from "@workspace/ui/components/ui/button"
import { Button } from '@workspace/ui/components/ui/button';
```
9 changes: 5 additions & 4 deletions src/frontend/apps/web/app/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ export default function RootLayout({
children: React.ReactNode;
}>) {
return (
<html lang="en" suppressHydrationWarning>
<body
className={`${geistSans.variable} ${geistMono.variable} font-sans antialiased `}
>
<html
lang="en"
suppressHydrationWarning
>
<body className={`${geistSans.variable} ${geistMono.variable} font-sans antialiased `}>
<Providers>{children}</Providers>
</body>
</html>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,13 @@ function RQProvider({ children }: Props) {
retry: false,
},
},
})
}),
);

return (
<QueryClientProvider client={client}>
{children}
<ReactQueryDevtools
initialIsOpen={process.env.NEXT_PUBLIC_MODE === 'local'}
/>
<ReactQueryDevtools initialIsOpen={process.env.NEXT_PUBLIC_MODE === 'local'} />
</QueryClientProvider>
);
}
Expand Down
2 changes: 1 addition & 1 deletion src/frontend/apps/web/tailwind.config.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from "@workspace/ui/tailwind.config";
export * from '@workspace/ui/tailwind.config';
19 changes: 19 additions & 0 deletions src/frontend/dangerfile.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { danger, fail, warn, message } from 'danger';

// PR에서 변경된 파일 목록 가져오기
const changedFiles = danger.git.modified_files;

// 예시: 변경된 파일에 대해 경고 추가
if (changedFiles.some((file) => file.includes('src/frontend'))) {
warn('Frontend files were modified. Please ensure that UI tests are run.');
}

// 예시: 특정 파일이 포함된 경우 실패를 표시
if (changedFiles.some((file) => file.includes('README.md'))) {
fail('The README.md file was modified. Please check for outdated documentation.');
}

// 예시: 특정 파일 변경을 알림으로 표시
if (changedFiles.length === 0) {
message('No files were modified in this PR.');
}
5 changes: 4 additions & 1 deletion src/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,14 @@
"lint": "turbo lint",
"format": "prettier --write \"**/*.{ts,tsx,md}\"",
"storybook": "pnpm --filter @workspace/ui run storybook",
"build-storybook": "pnpm --filter @workspace/ui run build-storybook"
"build-storybook": "pnpm --filter @workspace/ui run build-storybook",
"danger": "danger ci --config tsconfig.danger.json",
"typescript": "tsc --noEmit"
},
"devDependencies": {
"@workspace/eslint-config": "workspace:*",
"@workspace/typescript-config": "workspace:*",
"danger": "^12.3.3",
"prettier": "^3.4.2",
"turbo": "^2.3.3",
"typescript": "5.7.3"
Expand Down
32 changes: 17 additions & 15 deletions src/frontend/packages/eslint-config/next.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import js from "@eslint/js"
import pluginNext from "@next/eslint-plugin-next"
import eslintConfigPrettier from "eslint-config-prettier"
import pluginReact from "eslint-plugin-react"
import pluginReactHooks from "eslint-plugin-react-hooks"
import globals from "globals"
import tseslint from "typescript-eslint"
import js from '@eslint/js';
import pluginNext from '@next/eslint-plugin-next';
import eslintConfigPrettier from 'eslint-config-prettier';
import pluginReact from 'eslint-plugin-react';
import pluginReactHooks from 'eslint-plugin-react-hooks';
import globals from 'globals';
import tseslint from 'typescript-eslint';

import { config as baseConfig } from "./base.js"
import { config as baseConfig } from './base.js';

/**
* A custom ESLint configuration for libraries that use Next.js.
Expand All @@ -29,23 +29,25 @@ export const nextJsConfig = [
},
{
plugins: {
"@next/next": pluginNext,
'@next/next': pluginNext,
},
rules: {
...pluginNext.configs.recommended.rules,
...pluginNext.configs["core-web-vitals"].rules,
...pluginNext.configs['core-web-vitals'].rules,
},
},
{
plugins: {
"react-hooks": pluginReactHooks,
'react-hooks': pluginReactHooks,
},
settings: { react: { version: "detect" } },
settings: { react: { version: 'detect' } },
rules: {
...pluginReactHooks.configs.recommended.rules,
// React scope no longer necessary with new JSX transform.
"react/react-in-jsx-scope": "off",
"react/prop-types": "off",
'react/react-in-jsx-scope': 'off',
'react/prop-types': 'off',
'@typescript-eslint/no-unused-expressions': 'off',
'@typescript-eslint/no-unused-vars': 'off',
},
},
]
];
2 changes: 1 addition & 1 deletion src/frontend/packages/eslint-config/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"@next/eslint-plugin-next": "^15.1.0",
"@typescript-eslint/eslint-plugin": "^8.15.0",
"@typescript-eslint/parser": "^8.15.0",
"eslint": "^9.15.0",
"eslint": "^8.56.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-only-warn": "^1.1.0",
"eslint-plugin-react": "^7.37.2",
Expand Down
Loading
Loading