-
Notifications
You must be signed in to change notification settings - Fork 4
Feat/setting/DEVING-8 #8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
6264c1a
c9de8ae
033d854
e3ca4d8
d18dbe6
b3b7b68
3d2c525
a4f7797
3f991c8
c1276bc
483bfbe
22ff163
7eb4f72
835b27a
e18c922
daa69b6
ffe8e38
6242610
d5b6cff
b8ab784
f80da4b
f215716
e67ca79
27b984d
fda085c
ba850b9
476c736
40ab350
9152f63
036a9fd
6cb5c11
baf3461
ade5f7d
2d7c5ca
b16c25b
a463269
12ed3ab
dbd594e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| language: 'ko-KR' | ||
| early_access: false | ||
| reviews: | ||
| profile: 'chill' | ||
| request_changes_workflow: false | ||
| high_level_summary: true | ||
| poem: false | ||
| allowed_branches: ['*'] | ||
| review_status: true | ||
| collapse_walkthrough: false | ||
| auto_review: | ||
| enabled: true | ||
| drafts: false | ||
| chat: | ||
| auto_reply: true |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,32 +1,19 @@ | ||
| # π― PR λ΄μ© | ||
| ## πΒ μ£Όμ μμ λ΄μ© | ||
|
|
||
| ex) λ³ΈμΈμ΄ μμ±ν λ΄μ©μ λν μμΈ μ€λͺ | ||
|
|
||
| ## μμ λ΄μ© | ||
| <!-- μμ λ΄μ©μ μμΈν μ€λͺ ν΄μ£ΌμΈμ --> | ||
| ## πΊΒ μ€ν¬λ¦°μ· | ||
|
|
||
| (μ νμ¬ν) | ||
|
|
||
| ## μ€ν¬λ¦°μ· | ||
| ## π μ°Έκ³ μ¬ν | ||
|
|
||
| ex) μλ Όν μ , 리뷰μ΄κ° μ νμκ° μλ μΆκ° μ 보λ λ¬Έμ, μ°Έκ³ λ§ν¬λ₯Ό ν¬ν¨. | ||
|
|
||
| ### μμ κ²°κ³Όλ¬Ό | ||
| <!-- μ€μ ꡬν νλ©΄μ μΊ‘μ³ν΄μ£ΌμΈμ --> | ||
| ## π¬Β 리뷰 μꡬμ¬ν | ||
|
|
||
| ex) μ€μ μ μΌλ‘ 리뷰ν΄μ€¬μΌλ©΄ νλ λΆλΆ | ||
|
|
||
| ### κ΄λ ¨ μ΄μ | ||
| <!-- JIRA μ΄μμ μ€ν¬λ¦°μ·μ 첨λΆν΄μ£ΌμΈμ --> | ||
| ## πΒ κ΄λ ¨ μ΄μ | ||
|
|
||
|
|
||
| ## β PR ν¬μΈνΈ | ||
|
|
||
|
|
||
| ### λ¦¬λ·°μ΄ μ°Έκ³ μ¬ν | ||
| <!-- 리뷰μ΄κ° μ°Έκ³ ν΄μΌ ν λ΄μ©μ μμ±ν΄μ£ΌμΈμ --> | ||
| - | ||
|
|
||
| ### μ€μ 리뷰 μμ | ||
| <!-- μ€μ μ μΌλ‘ 리뷰λ°κ³ μΆμ λΆλΆμ μμ±ν΄μ£ΌμΈμ --> | ||
| - | ||
|
|
||
| ## π κ΄λ ¨ μ΄μ | ||
| <!-- μ°κ²°λ μ΄μ λ²νΈλ₯Ό μμ±ν΄μ£ΌμΈμ --> | ||
| close # | ||
| ex) #μ΄μ λ²νΈ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,90 @@ | ||
| name: PR Check | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, synchronize, reopened] | ||
|
|
||
| jobs: | ||
| check: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
|
||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v3 | ||
| with: | ||
| node-version: '18' | ||
| cache: 'npm' | ||
|
|
||
| - name: Install dependencies | ||
| id: install | ||
| run: npm ci | ||
|
|
||
| - name: Lint check | ||
| id: lint | ||
| continue-on-error: true | ||
| run: npm run lint:fix | ||
|
|
||
| - name: Format check | ||
| id: format | ||
| continue-on-error: true | ||
| run: npm run format | ||
|
|
||
| - name: Type check | ||
| id: typecheck | ||
| continue-on-error: true | ||
| run: npx tsc --noEmit | ||
|
|
||
| - name: Run tests | ||
| id: test | ||
| continue-on-error: true | ||
| run: npm run test | ||
|
|
||
| - name: Upload coverage reports to Codecov | ||
| uses: codecov/codecov-action@v3 | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
|
|
||
| - name: Build check | ||
| id: build | ||
| continue-on-error: true | ||
| run: npm run build | ||
|
|
||
| - name: Report Status | ||
| if: always() | ||
| uses: actions/github-script@v6 | ||
| with: | ||
| script: | | ||
| const steps = { | ||
| lint: '${{ steps.lint.outcome }}', | ||
| format: '${{ steps.format.outcome }}', | ||
| typecheck: '${{ steps.typecheck.outcome }}', | ||
| test: '${{ steps.test.outcome }}', | ||
| build: '${{ steps.build.outcome }}' | ||
| }; | ||
|
|
||
| const emoji = (status) => status === 'success' ? 'β ' : 'β'; | ||
|
|
||
| const body = `## CI Status Report\n\n` + | ||
| `### κ²μ¬ κ²°κ³Ό\n` + | ||
| `- Lint: ${emoji(steps.lint)} ${steps.lint}\n` + | ||
| `- Format: ${emoji(steps.format)} ${steps.format}\n` + | ||
| `- Type Check: ${emoji(steps.typecheck)} ${steps.typecheck}\n` + | ||
| `- Tests: ${emoji(steps.test)} ${steps.test}\n` + | ||
| `- Build: ${emoji(steps.build)} ${steps.build}\n\n` + | ||
| `${Object.values(steps).every(s => s === 'success') ? 'β λͺ¨λ κ²μ¬κ° ν΅κ³Όλμμ΅λλ€.' : 'β μΌλΆ κ²μ¬κ° μ€ν¨νμ΅λλ€.'}`; | ||
|
|
||
| await github.rest.issues.createComment({ | ||
| ...context.repo, | ||
| issue_number: context.issue.number, | ||
| body: body | ||
| }); | ||
|
|
||
| if (Object.values(steps).some(s => s === 'failure')) { | ||
| core.setFailed('Some checks failed'); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| name: PR Labeler | ||
|
|
||
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, edited] | ||
|
|
||
| jobs: | ||
| label: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v3 | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. GitHub Actions λ²μ μ λ°μ΄νΈκ° νμν©λλ€. νμ¬ μ¬μ© μ€μΈ GitHub Actions λ²μ μ΄ μ€λλμμ΅λλ€. μ΅μ λ²μ μΌλ‘ μ λ°μ΄νΈκ° νμν©λλ€. λ€μκ³Ό κ°μ΄ μμ ν΄μ£ΌμΈμ: - - uses: actions/checkout@v3
+ - uses: actions/checkout@v4
- uses: actions/github-script@v6
+ uses: actions/github-script@v7Also applies to: 18-18 π§° Toolsπͺ actionlint (1.7.4)15-15: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue (action) |
||
|
|
||
| - name: Label PR based on commit messages | ||
| uses: actions/github-script@v6 | ||
| with: | ||
| script: | | ||
| try { | ||
| const { data: commits } = await github.rest.pulls.listCommits({ | ||
| ...context.repo, | ||
| pull_number: context.issue.number | ||
| }); | ||
|
|
||
| const labels = new Set(); | ||
| commits.forEach(commit => { | ||
| const msg = commit.commit.message; | ||
| // Using regex to match your commit convention: type(issue) message | ||
| const typeMatch = msg.match(/^(feat|fix|style|refactor|test|docs|chore|setting)\(/i); | ||
|
|
||
| if (typeMatch) { | ||
| const type = typeMatch[1].toLowerCase(); | ||
| switch (type) { | ||
| case 'feat': | ||
| labels.add('β¨ feat'); | ||
| break; | ||
| case 'fix': | ||
| labels.add('π fix'); | ||
| break; | ||
| case 'style': | ||
| labels.add('π style'); | ||
| break; | ||
| case 'refactor': | ||
| labels.add('β»οΈ refactor'); | ||
| break; | ||
| case 'test': | ||
| labels.add('β test'); | ||
| break; | ||
| case 'docs': | ||
| labels.add('π docs'); | ||
| break; | ||
| case 'chore': | ||
| labels.add('π§ chore'); | ||
| break; | ||
| case 'setting': | ||
| labels.add('βοΈ setting'); | ||
| break; | ||
| } | ||
| } | ||
| }); | ||
|
|
||
| if (labels.size > 0) { | ||
| await github.rest.issues.addLabels({ | ||
| ...context.repo, | ||
| issue_number: context.issue.number, | ||
| labels: Array.from(labels) | ||
| }); | ||
| } | ||
| } catch (error) { | ||
| core.setFailed(`Action failed with error: ${error}`); | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| import add from '@/util/add'; | ||
|
|
||
| test('2+3=5', () => { | ||
| expect(add(2, 3)).toBe(5); | ||
| }); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // jest.config.ts | ||
| import type { Config } from 'jest'; | ||
| import nextJest from 'next/jest.js'; | ||
|
|
||
| const createJestConfig = nextJest({ | ||
| // Provide the path to your Next.js app to load next.config.js and .env files in your test environment | ||
| dir: './', | ||
| }); | ||
|
|
||
| // Add any custom config to be passed to Jest | ||
| const config: Config = { | ||
| coverageProvider: 'v8', | ||
| testEnvironment: 'jsdom', | ||
| setupFilesAfterEnv: ['<rootDir>/jest.setup.ts'], | ||
| moduleNameMapper: { | ||
| '^@/app/(.*)$': '<rootDir>/app/$1', | ||
| '^@/components/(.*)$': '<rootDir>/components/$1', | ||
| '^@/hooks/(.*)$': '<rootDir>/hooks/$1', | ||
| '^@/lib/(.*)$': '<rootDir>/lib/$1', | ||
| '^@/util/(.*)$': '<rootDir>/util/$1', | ||
| }, | ||
| }; | ||
|
|
||
| // createJestConfig is exported this way to ensure that next/jest can load the Next.js config which is async | ||
| export default createJestConfig(config); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| import '@testing-library/jest-dom'; | ||
|
|
||
| jest.spyOn(console, 'error').mockImplementation((message) => { | ||
| if (message.includes('fetchPriority')) { | ||
| return; | ||
| } | ||
| }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
GitHub Actions λ²μ μ λ°μ΄νΈκ° νμν©λλ€.
μ¬λ¬ GitHub Actionsμ λ²μ μ΄ μ€λλμμ΅λλ€. μ΅μ λ²μ μΌλ‘ μ λ°μ΄νΈκ° νμν©λλ€.
λ€μκ³Ό κ°μ΄ μμ ν΄μ£ΌμΈμ:
Also applies to: 19-19, 49-49, 60-60
π§° Tools
πͺ actionlint (1.7.4)
16-16: the runner of "actions/checkout@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue
(action)