Skip to content

Add CI: shellcheck + macOS bash 3.2 parse + macOS full smoke run#17

Merged
Clsan merged 3 commits into
masterfrom
claude/dreamy-goldberg-755f11
May 6, 2026
Merged

Add CI: shellcheck + macOS bash 3.2 parse + macOS full smoke run#17
Clsan merged 3 commits into
masterfrom
claude/dreamy-goldberg-755f11

Conversation

@Clsan
Copy link
Copy Markdown
Owner

@Clsan Clsan commented May 6, 2026

Summary

셋업 스크립트는 새 맥에서만 돌리는 특성상 회귀가 늦게 발견됨 → PR 단계에서 자동 검증.

세 단계 검증:

  1. shellcheck (Ubuntu): 따옴표 누락, 미정의 변수, trap quoting 같은 문법 실수 검출. SC2016 제외 (add_to_zshrc 가 리터럴 \$(...) 를 .zshrc 에 써야 하는 의도된 동작).
  2. bash -n on macOS system bash 3.2: macOS 기본 bash 가 3.2 — bash 4+ 기능을 무심코 쓰면 fresh mac 에서만 깨짐. 시스템 bash 로 parse-check.
  3. smoke-macos: 실제로 setup.sh 끝까지 실행: lint 가 못 잡는 진짜 회귀 — brew install 패키지 이름 오타, 사라진 cask, 변경된 mise 식별자, defaults 키 변경, gh / pmset 명령어 변경 — 을 GHA macOS 러너에서 실제 실행으로 검증. 이게 진짜 검증.

CircleCI PR (#9) 의 의도를 살리되 가성비/실효성 모두 더 높은 방식.

Skip 처리

SETUP_NONINTERACTIVE=1 가드로 CI 에서 스킵:

  • interactive_setup.shgh auth login --web, gh ssh-key add, osascript 알림 — 사람/브라우저 필요
  • colima start — nested-virt 시작이 GHA 에서 느리고 그 자체 실패는 스크립트 회귀가 아닌 환경 이슈

SETUP_NONINTERACTIVE 가 비어있으면 (=로컬) 평소처럼 인터랙티브 단계까지 모두 동작.

부수 변경

  • common.sh:21 SC2064 trap quoting 한 줄 수정 — single quote 으로 늦은 확장. CI 첫 실행 통과용.

Test plan

  • shellcheck --severity=warning --exclude=SC2016 *.sh 로컬 통과
  • /bin/bash -n (3.2) 모든 .sh parse 통과
  • PR CI 세 잡 모두 green 확인 — 특히 smoke-macos 가 실제로 끝까지 돌면서 brew/mise/defaults 가 정상 동작하는지
  • (선택) 일부러 brew install starshipp 같은 오타 넣고 push 해서 smoke 가 빨간불 뜨는지 확인

셋업 스크립트는 새 맥에서만 실행되는 코드라 회귀를 늦게 발견함.
shellcheck 으로 흔한 bash 실수를 PR 단계에서 자동 검출하고,
macOS 기본 bash(3.2) 으로 parse-check 해서 fresh mac 에서만
깨지는 bash 4+ 기능 사용을 사전에 막음.

SC2016 은 add_to_zshrc 가 리터럴 \$(...) 를 .zshrc 에 써야 하는
의도된 동작이라 제외. SC2064 (common.sh trap) 한 줄은 single
quote 으로 수정.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Clsan Clsan mentioned this pull request May 6, 2026
shellcheck 만으로는 'brew install starshipp' 같은 패키지 이름 오타,
사라진 cask, 변경된 mise 식별자, defaults 키 변경 등 진짜 회귀는
못 잡음. macOS 러너에서 setup.sh 를 실제로 끝까지 돌려서 확인.

SETUP_NONINTERACTIVE=1 가드:
- setup.sh: interactive_setup.sh source 와 colima start 스킵
- work_setup.sh: interactive_setup.sh source 스킵

콜리마는 nested-virt 라 GHA macOS 에서 시작이 느리고, 그 단계의
실패는 스크립트 회귀가 아니라 러너 환경 이슈라 검증 가치가 낮음.
인터랙티브는 gh auth login --web / osascript 알림 같은 사람 손이
필요한 단계라 CI 에서 skip.

concurrency 그룹으로 같은 브랜치 푸시 연쇄 시 직전 실행 취소 —
40분 timeout 으로 무한루프 보호.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Clsan Clsan changed the title Add shellcheck + macOS bash 3.2 parse-check CI Add CI: shellcheck + macOS bash 3.2 parse + macOS full smoke run May 6, 2026
첫 smoke 실행에서 brew/mise (Go/Node/Java) 까지 다 성공했지만
gradle 단계에서 GitHub API rate limit (60/h, 미인증) 에 걸림.
mise 는 GITHUB_TOKEN 환경변수가 있으면 인증된 호출로 바꿔서
한도를 5000/h 로 끌어올림. GHA 워크플로우 자동 토큰 사용.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Clsan Clsan merged commit 4bd7a8f into master May 6, 2026
3 of 4 checks passed
@Clsan Clsan deleted the claude/dreamy-goldberg-755f11 branch May 6, 2026 04:22
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.

1 participant