ci: build-test 잡이 테스트를 컴파일조차 하지 않던 문제 수정 - #79
Merged
Conversation
빌드 단계가 -Dmaven.test.skip=true 로 돌아 src/test 의 테스트 19개 클래스가 컴파일도 되지 않았다. 이 플래그는 실행뿐 아니라 테스트 컴파일까지 건너뛴다. 테스트 소스에 컴파일 오류를 넣고 같은 명령을 돌려도 'Not compiling test sources' 를 찍고 BUILD SUCCESS 가 난다. 이 줄은 저장소에 src/test 가 없던 2023-04-07 에 쓰였고, 테스트가 main 에 들어온 뒤에도 그대로 남았다. 플래그를 지우면 18개 클래스 54건이 돈다. 브라우저 창을 띄우는 EgovSampleControllerTestSelenium 은 이름이 surefire 기본 include 에 걸리지 않아 선택되지 않는다.
jei007
approved these changes
Sep 11, 2026
jei007
left a comment
Contributor
There was a problem hiding this comment.
표준프레임워크에 대한 지속적인 참여에
대단히 감사드립니다.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
수정 사유 Reason for modification
수정된 소스 내용 Modified source
워크플로 이름은
build-test이고(.github/workflows/maven.yml:1) README 7행이 그 배지를 노출합니다. 그런데 유일한 빌드 단계(23행)가-Dmaven.test.skip=true로 돌아src/test의 테스트 19개 클래스가 실행은커녕 컴파일도 되지 않습니다.maven.test.skip은skipTests와 달리 surefire 실행뿐 아니라testCompile단계까지 건너뜁니다.테스트 소스에 컴파일 오류를 넣고 워크플로와 같은 명령을 돌려도 이렇게 끝납니다.
이 줄이 쓰인 2023-04-07 에는 저장소에
src/test가 없었습니다. main 이 테스트를 처음 받은 것은 23개월 뒤인 2025-03-06(#28 머지)이고, 그 뒤로 maven.yml 이 네 번 고쳐지는 동안에도 이 줄만 그대로 남았습니다. 테스트를 끄려고 넣은 플래그가 아니라 테스트가 없던 시절의 설정으로 보입니다.변경
플래그만 지웠습니다. 브라우저 창을 띄우는
EgovSampleControllerTestSelenium(@BeforeEach에서 옵션 없이new ChromeDriver()호출, 36행)은 이름이 surefire 기본 include(Test*·*Test·*Tests·*TestCase)에 걸리지 않아 선택되지 않고, 나머지 18개 클래스 54건이main대상 push·PR 에서 돌게 됩니다.pom.xml은 건드리지 않았습니다. surefire 설정을 새로 넣지 않아도 워크플로 한 줄로 같은 결과가 나오고, 로컬mvn test동작도 그대로 남습니다.영향 범위
push·pull_request(main)로 도는 유일한 워크플로의 빌드 단계 한 줄입니다.egovframe-boot-web-5.0.0.jar산출물은 동일하고 다음 단계ls -laR target도 그대로 성공합니다(목록에test-classes·surefire-reports가 추가됩니다). 애플리케이션 코드·설정·테스트 코드 변경은 없습니다.검증 (실측)
위 출력은 테스트 소스를 일부러 망가뜨려 얻은 것입니다.
같은 파일에 이 PR 의 명령을 쓰면 잡힙니다.
되돌린 뒤 같은 명령을 실행한 결과입니다.
빠지는 Selenium 클래스는 단독으로도 실행해 보았습니다 —
mvn -B test -Dtest='*Selenium'→Tests run: 1, Failures: 0, Errors: 0, Skipped: 0. 깨져서 빠지는 것이 아니고, 헤드리스 전환은 테스트 코드 쪽 별건입니다.release 17)JUnit 테스트 JUnit tests
저장소에 이미 있는 테스트를 실행만 되살렸고 새로 추가한 테스트는 없습니다. 수동 테스트는 워크플로의
run:명령을 그대로 실행하는 방식으로 했습니다.테스트 브라우저 Test Browser
해당 없음 (CI 워크플로 변경, 화면 영향 없음)
테스트 스크린샷 또는 캡처 영상 Test screenshots or captured video
해당 없음 — 위 명령 출력으로 대신합니다.