Skip to content

chore(workflow): github 자동화·화면 테스트 자동화 - #239

Open
KangShinGyu98 wants to merge 4 commits into
devfrom
chore/git-workflow-automation
Open

KangShinGyu98 wants to merge 4 commits into
devfrom
chore/git-workflow-automation

Conversation

@KangShinGyu98

@KangShinGyu98 KangShinGyu98 commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

노션

변경 내용

  • CONTRIBUTING에 브랜치 종류 표 추가: feature·fix·refactor·chore·docs는 dev, hotfix는 main 기준
  • PR 전 검증(lint → test → build → 화면 확인)과 노션·PR·디스코드 작업 공유 기준 정리
  • 변경 종류별 화면 확인 기준 표 추가(PC 크롬·PC 사파리·안드로이드·아이폰)
  • PR 템플릿에 노션 링크 칸과 화면 확인 항목 추가
  • Claude Code 스킬 /start-work(최신 기준 브랜치에서 브랜치 생성), /open-pr(대상 브랜치 반영·검증·PR 생성, 병합은 하지 않음), /check-screens(환경별 스크린샷 확인) 추가
  • npm run screens: Playwright로 PC 크롬·사파리(WebKit)·안드로이드(Galaxy S24 에뮬레이션), simctl로 아이폰 시뮬레이터 스크린샷. 3000번 dev 서버가 현재 폴더 코드인지 검사하고, 로그인은 전용 크롬 프로필에서 해 localhost 쿠키만 저장
  • vitest에 테스트용 NEXT_PUBLIC_* 값을 넣어, clientEnv import 시 36개 테스트 파일이 로드 단계에서 실패하던 문제 수정

변경 이유

  • 브랜치 접두사가 섞여 있고(feat/·codex/ 등) 작업마다 노션·PR·디스코드 공유 범위가 달라, 기준을 한곳에 정리하고 반복되는 Git 작업을 스킬로 자동화합니다.
  • 4개 환경 화면 확인을 매번 손으로 하던 것을 변경 종류별로 줄이고, 스크린샷은 자동으로 찍습니다.

테스트

  • npm run lint (에러 0, 기존 경고 4)
  • npm test (186개 파일, 1484개 테스트 통과)
  • npm run build
  • 화면 확인(npm run screens): /home을 pc-chrome, pc-safari, android, iphone에서 로그인 상태로 촬영

🤖 Generated with Claude Code

- CONTRIBUTING에 브랜치 종류 표(fix·refactor·chore·docs 추가), PR 전 검증, 작업 공유 기준 정리
- PR 템플릿에 노션 링크 칸 추가
- Claude Code 스킬 start-work, open-pr 추가
- vitest에 테스트용 NEXT_PUBLIC 환경 변수를 넣어 36개 파일 로드 실패 수정
- .claude/settings.local.json을 gitignore에 추가

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@vercel

vercel Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
frontend-server Ready Ready Preview Oct 16, 2026 7:07am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Important

  • 🔍 Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e7f1d6ca-3333-4c14-9d88-7a777d08caef
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

Comment @coderabbitai help to get the list of available commands.

- npm run screens: Playwright로 PC 크롬·사파리(WebKit)·안드로이드(Galaxy S24 에뮬레이션), simctl로 아이폰 시뮬레이터 스크린샷
- 전용 크롬 프로필에서 로그인해 localhost 인증 쿠키만 저장
- 3000번 dev 서버가 현재 폴더 코드인지 검사
- open-pr 검증에 화면 확인 단계, PR 템플릿에 화면 확인 항목 추가
- CONTRIBUTING에 화면 확인 기준 표 추가

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@KangShinGyu98 KangShinGyu98 changed the title chore(workflow): github 자동화 스킬 추가 chore(workflow): github 자동화·화면 테스트 자동화 Oct 15, 2026

@minbros minbros left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

라벨의 출력 경로 이탈, Chrome 소유권 확인 누락, 기존 PR 갱신 시 확인 단계의 모순을 수정해 주세요.

Comment thread scripts/check-screens.mjs Outdated
assertServerServesThisRepo();
if (!readAuthState()) console.warn(`! 로그인 상태가 없습니다. 로그인이 필요한 화면은 npm run screens -- login 후 다시 찍으세요.`);

const outDir = path.join(".screens", args.label ?? timestampLabel());

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] 라벨이 출력 폴더 밖을 가리키지 않도록 제한해 주세요.

args.label을 그대로 경로에 붙이므로 --label ../existing-output을 전달하면 출력 위치가 .screens 밖으로 나갑니다. 이후 이미지 저장과 writeFileSync(path.join(outDir, "results.json"), ...)가 해당 위치에 기록하여 기존 결과 파일을 덮어쓸 수 있습니다. 라벨을 단일 디렉터리 이름으로 제한하거나, 정규화한 출력 경로가 .screens 내부인지 쓰기 전에 확인해 주세요.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

반영했습니다 (5c81a80)

  • --label은 영문·숫자·. - _로 된 폴더 이름 하나만 받습니다(첫 글자는 영문·숫자). 그다음 path.resolve 결과가 .screens 바로 아래인지 한 번 더 확인합니다.
  • --label ../src, --label ., --label a/b는 실행 전에 거절됩니다.
  • 같은 문제가 있던 --path도 앱 origin을 벗어나는 값(//다른곳, /\다른곳, 절대 URL)을 거절하도록 고쳤습니다.

Comment thread scripts/check-screens.mjs
Comment on lines +134 to +137
const browser = await chromium.connectOverCDP(`http://127.0.0.1:${port}`);
const saved = await saveAuthState(browser.contexts()[0]);
const cdp = await browser.newBrowserCDPSession();
await cdp.send("Browser.close").catch(() => {});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] 이번 실행에서 띄운 Chrome인지 확인한 뒤 연결·종료해 주세요.

login()은 고정 포트 9333의 페이지 목록에서 앱 /home을 찾으면 해당 브라우저에 연결해 인증 상태를 저장하고 Browser.close를 보냅니다. 다른 디버깅 Chrome이 이미 이 포트를 사용하고 앱 홈 화면을 열고 있으면, 새 Chrome 대신 기존 브라우저의 인증 상태를 저장하고 그 브라우저 전체를 종료할 수 있습니다. 포트 충돌을 처리하고, 연결 대상이 이번 실행에서 만든 브라우저임을 확인한 뒤 저장·종료하도록 해 주세요.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

반영했습니다 (5c81a80)

  • 고정 포트 9333 대신 --remote-debugging-port=0으로 크롬을 띄웁니다. 크롬이 전용 프로필 폴더에 적는 DevToolsActivePort 파일(실행 전에 지움)의 포트로만 연결·저장·종료합니다.
  • 다른 디버깅 크롬이 떠 있어도 그쪽에는 붙지 않고, 끄지도 않습니다.
  • 같은 프로필 창이 이미 열려 있으면 포트 파일이 생기지 않습니다. 이때는 15초 뒤 "열린 창을 닫고 다시 실행"하라고 안내하고 멈춥니다.

Comment thread .claude/skills/open-pr/SKILL.md Outdated
| `docs/` | `dev` | `docs` |
| `hotfix/` | `main` | `fix` |

- `gh pr view --json url,state`로 이 브랜치의 열린 PR이 있는지 확인한다. 이미 있으면 새로 만들지 않고, 1~3단계 후 push만 하고 기존 PR 주소를 알린다.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

[P2] 기존 PR 갱신도 push 전 확인 단계로 연결해 주세요.

여기서는 기존 PR이 있으면 1~3단계 후 바로 push하도록 안내하지만, 5단계에는 “확인받기 전에는 push하거나 PR을 열지 않는다”고 명시되어 있습니다. 변경이 이미 커밋되어 있으면 1단계 질문도 없어, 기존 PR 경로는 게시 확인 없이 원격 변경을 올리게 됩니다. 기존 PR도 push 전에 확인을 받도록 연결하거나, 확인을 생략하려는 예외라면 두 지시가 충돌하지 않도록 명확히 해 주세요.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

반영했습니다 (5c81a80)

  • 기존 PR이 있으면 4단계(본문 작성)만 건너뜁니다. 5단계에서 기존 PR 주소와 push할 커밋 목록을 보여 주고 확인받은 뒤, 6단계에서 git push만 합니다.
  • 5단계 문구도 "기존 PR 갱신을 포함해 확인받기 전에는 push하지 않는다"로 맞춰 두 지시가 충돌하지 않게 했습니다.

- --label은 .screens 바로 아래 폴더 이름만, --base는 로컬 http 주소만, --path는 앱 안 경로만 허용
- login이 고정 포트 대신 빈 포트로 띄운 전용 프로필 크롬에만 연결·저장·종료
- 외부 명령(lsof·git·open·xcrun·xcode-select)을 절대 경로로 호출
- open-pr: 기존 PR 갱신도 push 전에 커밋 목록을 보여 주고 확인

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- --base는 허용한 호스트 이름과 숫자 포트로 주소를 다시 만들어 크롬 인자로 넘김
- 결과 파일은 쓰기 직전에 .screens 안인지 확인하고, 사용법 오류는 ✖ 메시지로 출력

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

This branch was successfully deployed

1 active deployment
Preview — 673252ad Deployed Oct 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants