ci: 테스트 매트릭스에 macOS·Windows 추가 - #25
Merged
Merged
Conversation
better-sqlite3는 네이티브 모듈이라 플랫폼별 prebuild가 실제로 붙는지 확인이 필요한데 지금까지 linux-x64 하나만 검증됐다. 잡 3개 -> 9개(3 OS x 3 Node). 저장소가 public이라 러너는 무료다.
Windows에서 os.userInfo().uid가 -1이라 `\d+` 정규식이 'gui/-1/...'을 받지 못해 실패했다. 이 테스트는 platform을 주입해 어느 OS에서든 돌도록 설계됐고(파일 상단 주석), 스킵하면 그 의도가 깨진다. 호스트의 실제 uid로 완전 일치를 단언하도록 바꿨다. 테스트 목적인 "prefix·glob 금지, 완전 일치 조회"를 정규식 부분 매칭보다 정확히 검증한다.
better-sqlite3@13은 gypfile:false로 암묵 node-gyp를 막아뒀지만, 그 필드가 lockfile과 abbreviated packument 양쪽에서 유실된다. npm ci는 lockfile로 트리를 만들어 gypfile이 undefined가 되고, 조건을 통과해 node-gyp rebuild를 합성한다. Windows Node 22에서 VS 미검출로 설치가 실패했다. (npm/cli#9837, WiseLibs/better-sqlite3#1516) prebuild 로드는 lib/binding.js의 fs.existsSync 하나에만 의존하므로 스크립트를 건너뛰어도 무해하다. Node 24/26 잡이 이미 실증했다 - npm 11의 allowScripts가 gyp를 차단했는데도 SQLite 테스트가 전부 통과했다. 추가로 전역 설치 스모크 스텝을 붙였다. CI는 npm ci(lockfile 경로)만 검증했고 실사용자는 npm i -g(lockfile 없는 경로)로 들어온다. 그 사각지대를 닫는다.
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.
🏷️ 작업 유형
📋 변경 사항
runs-on을 매트릭스 변수(${{ matrix.os }})로 전환배경
linux-x641종뿐darwin-arm64·win32-x64추가 검증 (3종 커버)✅ 테스트
npm test— 185/185 통과 (로컬 darwin-arm64, Node 22.17.1)os·node동일 depth(8칸), 탭 문자 없음node --test 'test/*.test.js'를 따옴표로 셸 확장 차단 후 실행 → 185개 수집. cmd.exe가 glob을 안 풀어도 Node가 자체 확장하므로 0건 통과 위험 없음