Skip to content

테스트: 설치본 게이트가 웹 컴퓨터를 실행으로 검증한다 #181

테스트: 설치본 게이트가 웹 컴퓨터를 실행으로 검증한다

테스트: 설치본 게이트가 웹 컴퓨터를 실행으로 검증한다 #181

Workflow file for this run

# CI: 구조 게이트 + 브라우저 런타임 게이트. 게이트 정의의 SSOT는 tests/ (여기는 디스패치만).
name: ci
on:
push:
branches: [main]
pull_request:
jobs:
structure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
# 의존성 0이지만 workspaces(packages/*) 심볼릭 링크는 필요하다: 구조 게이트가
# Web Machine contract suite를 workspace 이름(@web-machine/*)으로 import한다.
- run: npm ci
- run: npm test
# 타입 계약 게이트: 손으로 유지하는 d.ts에 컴파일러를 붙인다. typescript는 CI 도구로만
# 쓰고 package 의존성으로 넣지 않는다(설치 의존성 0 유지).
- run: npm run test:types
browser:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
# ubuntu 러너에 Google Chrome이 프리인스톨되어 있다. CI=true라 --no-sandbox가 자동 적용된다.
- run: npm run test:browser
env:
PYPROC_BROWSER: /usr/bin/google-chrome
PYPROC_GATE_OUT: gateMeasurements.json
# 제품 소비자 게이트: npm pack으로 설치한 pyproc을 브라우저 앱이 public specifier로 import한다.
- run: npm run test:consumer
env:
PYPROC_BROWSER: /usr/bin/google-chrome
# 러너 실측 수치를 보존한다: 원장/리드미의 로컬 수치와 비교 가능한 근거.
- uses: actions/upload-artifact@v4
if: always()
with:
name: gate-measurements
path: gateMeasurements.json
if-no-files-found: ignore
# 예제 실행 게이트: 데모 페이지가 사람이 여는 그대로 완주하는지(진열장 회귀 방지).
- run: npm run test:examples
env:
PYPROC_BROWSER: /usr/bin/google-chrome
# 공유 러너(4 vCPU)는 4-워커 샤딩이 물리적으로 2.0x를 못 넘는다(실측 1.90-1.98x).
# 여기서의 게이트는 데모 완주+정확성이고, 속도 주장 인증은 artifact 계약(S1)이다.
PYPROC_EXAMPLES_MIN_SPEEDUP: "1.3"
# MCP 레시피 게이트: 에이전트 통합 표면(stdio JSON-RPC + 샌드박스 도구 4종)의 실왕복.
- run: npm run test:mcp
env:
PYPROC_BROWSER: /usr/bin/google-chrome
# WASI 세션 게이트: pyproc/wasi subpath(bootWasi/WasiSession)의 실배선.
# 30MB 자산은 릴리즈 zip에서 준비하고 버전 키로 캐시해 SKIP이 아니라 실제 GREEN으로 돈다.
- uses: actions/cache@v4
with:
path: |
tests/attempts/enginePort/python-3.14.6.wasm
tests/attempts/enginePort/python314-stdlib.zip
key: wasi-python-3.14.6-wasi_sdk-24-v2 # v2: 가짜 zip(GNU tar 산출물) 캐시 무효화
- run: node scripts/fetchWasiAssets.mjs
- run: node tests/browser/run.mjs tests/browser/wasiGate.html
env:
PYPROC_BROWSER: /usr/bin/google-chrome
web-computer:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
# 실행 자산(v86 engine/firmware/guest image)은 hash 고정 development channel이며
# 미추적이다: 준비 스크립트가 받아오고 catalog 버전 키로 캐시한다.
- uses: actions/cache@v4
with:
path: apps/webComputer/assets
key: web-computer-assets-${{ hashFiles('apps/webComputer/assetCatalog.json') }}
# 3-process 제품 E2E: 초기 부팅 -> 브라우저 프로세스 재시작 콜드 복원 -> 새 프로필 import.
- run: npm run test:web-computer
env:
PYPROC_BROWSER: /usr/bin/google-chrome