-
Notifications
You must be signed in to change notification settings - Fork 101
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
ci(codecov): upload coverage #65
Conversation
|
@manudeli is attempting to deploy a commit to the Toss Team on Vercel. A member of the Team first needs to authorize it. |
✅ Deploy Preview for es-hangul ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Welcome to Codecov 🎉Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests. Thanks for integrating Codecov - We've got you covered ☂️ |
- run: yarn test | ||
- uses: codecov/codecov-action@v4 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
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.
secret에 추가필요
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.
의도를 남겨요
"test": "vitest run --coverage --typecheck", | ||
"test:watch": "vitest --ui --coverage --typecheck", |
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.
- test coverage와 typecheck을 위해 viteset option을 추가합니다.
- vitest/ui를 사용해 watch모드인 경우 쉽게 해당 테스트 문제를 파악하고 커버리지를 파악할 수 있게 됩니다.
coverage: { | ||
provider: 'istanbul', | ||
include: ['src/**/*'], | ||
}, |
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.
test coverage를 측정하기 시작합니다
target: 100% | ||
threshold: 10% |
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.
테스트 커버리지 목표: 100% threshold 10%라서 90%의 테스트 커버리가 넘지 못하는 PR은 PR status check에서 x를 받게 됩니다
ignore: | ||
- '**/*.test-d.*' |
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.
codecov에서 test-d파일은 아직 테스트코드로 보지 않고 있습니다. 하지만 test-d는 vitest에서 타입테스트를 위해서 사용되고 있습니다. 커버율에 포함되지 않게 처리했습니다.
secrets에 CODECOV_TOKEN라는 이름으로 추가해뒀어요! |
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.
너무 좋은 PR이라고 생각해요!
말씀해주신대로, 테스트 코드에 대한 동기부여를 향상 시켜주는 도구라고 생각해요!
감사합니당~!
close #63
Overview
이제부터 이렇게 comment로 변경사항을 체크하고 목표 테스트 커버리지(90%로 설정해둠(목표: 100%, threshold: 10%))가 넘지 않으면 github status check에서 x로 막게 됩니다. 기여자도 테스트코드를 작성하기 위한 동기부여를 더 받을 수 있고 메인테이너도 쉽게 해당 변경으로 인한 테스트 커버리지를 빠르게 파악할 수 있게 됩니다
업로드를 위해 토큰이 필요합니다
PR Checklist