Skip to content
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

[Infra] CI의 정상 작동을 테스트합니다. #6

Merged
merged 4 commits into from
Jun 30, 2024

Conversation

no1msh
Copy link
Contributor

@no1msh no1msh commented Jun 29, 2024

resolved #4

AS-IS

그동안 직접 개발자가 ktlintCheck를 통하여 위반 사항을 체크하였습니다.
하지만 설정에 따라 제대로 코드 검사가 안되는 경우도 있습니다.

TO-BE

GithubAction을 활용하여 Ktlint 포메팅 검사와 작성한 유닛 테스트 통과 여부를 검사합니다.

KEY-POINT

그동안 test framework를 junit만 사용해서 추후 사용 예정인 kotest와 충돌나지 않을까 걱정하였는데,
다른 프로젝트로 CI + Kotest가 정상 작동하는 것을 확인하였습니다.

추후 프로젝트 규모가 커져 슬랙을 사용한다면 CI와 연동하여 결과를 메시지로 받아볼 수 있게 할 수도 있습니다.

한 가지 걱정되는건 오류가 있을 때 프로젝트에 존재하는 오류를 병렬적으로 전부 표시하는게 아닌 한 번의 CI 작동에 한 가지의 오류만을 체킹하고 결과로 알려줍니다.
여러 가지의 잘못된 사항이 있다면 그 개수 만큼 CI를 돌려야하는 상황입니다.
하지만 개발할 때 addKtlintCheckGitPrecommitHook을 제대로 실행 해두면 실질적으로 오류가 그렇게까지 크게 많이 있진 않을거 같습니다.
일단은 사용해보고 추후 이런 케이스가 오히려 생산성을 저하 시킨다면 다른 방법을 강구해보는게 좋을 것 같습니다.
대체제로 ScaCap의 Action-Ktlint을 사용하는 것도 방법일 것 같습니다.

SCREENSHOT (Optional)

Ktlint 규칙을 어겼을 때

image

테스트코드가 실패했을 때

image

@no1msh no1msh requested a review from librarywon June 29, 2024 06:53
@no1msh no1msh self-assigned this Jun 29, 2024
Copy link
Contributor

@librarywon librarywon left a comment

Choose a reason for hiding this comment

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

여러 가지의 잘못된 사항이 있다면 그 개수 만큼 CI를 돌려야하는 상황을 인지하였고
아직 처음 적용을 하는 것이니 개발하면서 생산성관련 논의는 진행해보면 좋을 것 같습니다.
고생하셨습니다!

@no1msh no1msh merged commit 85fdc52 into main Jun 30, 2024
1 check passed
@no1msh no1msh deleted the Infra/#4-android-ci-test branch June 30, 2024 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants