Skip to content

Comments

[chore] codecov 세팅#341

Merged
seongwon030 merged 2 commits intomainfrom
chore/codecov-setting
Apr 28, 2025
Merged

[chore] codecov 세팅#341
seongwon030 merged 2 commits intomainfrom
chore/codecov-setting

Conversation

@seongwon030
Copy link
Member

@seongwon030 seongwon030 commented Apr 27, 2025

#️⃣연관된 이슈

ex) #이슈번호, #이슈번호

📝작업 내용

codeCov로 테스트 커버리지 측정 및 자동화

  • pr올릴 때마다 전체 테스트파일 커버리지를 측정해줍니다.

중점적으로 리뷰받고 싶은 부분(선택)

리뷰어가 특별히 봐주었으면 하는 부분이 있다면 작성해주세요

ex) 메서드 XXX의 이름을 더 잘 짓고 싶은데 혹시 좋은 명칭이 있을까요?

논의하고 싶은 부분(선택)

논의하고 싶은 부분이 있다면 작성해주세요.

🫡 참고사항

Summary by CodeRabbit

  • Chores
    • PR 생성 시 테스트 커버리지 리포트를 Codecov에 업로드하는 GitHub Actions 워크플로우가 추가되었습니다.

@seongwon030 seongwon030 added ⚙ Setting 개발 환경 세팅 ✅ Test test 관련(storybook, jest...) 💻 FE Frontend labels Apr 27, 2025
@seongwon030 seongwon030 requested a review from oesnuj April 27, 2025 16:49
@seongwon030 seongwon030 self-assigned this Apr 27, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 27, 2025

Warning

.coderabbit.yaml has a parsing error

The CodeRabbit configuration file in this repository has a parsing error and default settings were used instead. Please fix the error(s) in the configuration file. You can initialize chat with CodeRabbit to get help with the configuration file.

💥 Parsing errors (1)
Validation error: Invalid regex pattern for base branches: {{value}} at "reviews.auto_review.base_branches[0]"
⚙️ Configuration instructions
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Walkthrough

이 변경 사항은 새로운 GitHub Actions 워크플로우 구성 파일인 codecov.yml을 추가합니다. 해당 워크플로우는 develop-fe 브랜치로의 풀 리퀘스트가 생성될 때 실행됩니다. 워크플로우는 리포지토리 체크아웃, Node.js 설정, 의존성 설치, Jest를 이용한 테스트 및 커버리지 수집, Codecov로 커버리지 리포트 업로드의 단계로 구성된 단일 잡을 정의합니다.

Changes

파일/경로 변경 요약
codecov.yml Codecov 업로드를 포함하는 새로운 GitHub Actions 워크플로우 파일 추가.

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub Actions
    participant Node.js
    participant Jest
    participant Codecov

    Developer->>GitHub Actions: Pull request to develop-fe 브랜치
    GitHub Actions->>GitHub Actions: 워크플로우 시작 (codecov.yml)
    GitHub Actions->>GitHub Actions: 리포지토리 체크아웃
    GitHub Actions->>Node.js: Node.js 환경 설정
    GitHub Actions->>GitHub Actions: npm install 실행
    GitHub Actions->>Jest: 테스트 및 커버리지 수집
    Jest-->>GitHub Actions: 커버리지 리포트 생성
    GitHub Actions->>Codecov: 커버리지 리포트 업로드
Loading

📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between ee38dbc and 5b2033d.

📒 Files selected for processing (1)
  • codecov.yml (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • codecov.yml

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@netlify
Copy link

netlify bot commented Apr 27, 2025

Deploy Preview for moadong canceled.

Name Link
🔨 Latest commit 5b2033d
🔍 Latest deploy log https://app.netlify.com/sites/moadong/deploys/680f103848d8080007d769e4

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (2)
codecov.yml (2)

18-20: Node.js 버전 지정 권장
프로젝트에 맞는 Node.js 버전을 명시하지 않으면 의도치 않은 버전에서 실행될 수 있습니다. setup-node 스텝에 node-version을 추가하세요.

       - name: Set up Node
         uses: actions/setup-node@v4
+        with:
+          node-version: '18'  # 또는 package.json에 정의된 버전을 사용

24-26: 테스트 실행 시 커버리지 임계값 설정 고려
현재 npx jest --coverage로 커버리지를 수집하지만, --coverageThreshold 옵션을 통해 최소 커버리지 비율을 강제하면 테스트 누락을 방지할 수 있습니다.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 381232a and ee38dbc.

📒 Files selected for processing (1)
  • codecov.yml (1 hunks)
🔇 Additional comments (2)
codecov.yml (2)

3-7: 트리거 조건 확인 완료
pull_request 이벤트가 develop-fe 브랜치로 제한되어 있어 PR마다 커버리지 측정을 수행하기에 적절합니다.


27-33: Codecov 업로드 설정 검증 필요
codecov/codecov-action@v5가 private repo일 경우 CODECOV_TOKEN 시크릿을 자동으로 사용하도록 구성되어 있는지 확인하세요. 시크릿이 누락되면 업로드가 실패할 수 있습니다.

Copy link
Member

@oesnuj oesnuj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
테스트 커버리지 적용 좋습니다

@seongwon030 seongwon030 merged commit 879d6a9 into main Apr 28, 2025
5 checks passed
@seongwon030 seongwon030 deleted the chore/codecov-setting branch April 28, 2025 05:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💻 FE Frontend ⚙ Setting 개발 환경 세팅 ✅ Test test 관련(storybook, jest...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants