chore: gitignore artefactos de debug del motor host (dSYM, pdb, ilk) #5
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
| name: tests | |
| # Corre la suite de tests JS en macOS y Windows en cada push y pull request. | |
| # El motor C (Phase 3) queda fuera de CI por diseño: requiere DOSBox-X / Watcom | |
| # y los runners gratis de GitHub Actions no los tienen configurados. | |
| on: | |
| push: | |
| branches: [main, 'marcos/**'] | |
| pull_request: | |
| branches: [main] | |
| workflow_dispatch: {} | |
| # Opt-in a Node 24 para los runtimes internos de las actions (actions/checkout, | |
| # actions/setup-node). A partir de 2026-06-02 sera el default; nos adelantamos | |
| # para que el log no muestre warnings de deprecation de Node 20. | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: 'true' | |
| jobs: | |
| test: | |
| name: tests (${{ matrix.os }} / Node ${{ matrix.node }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [macos-latest, windows-latest] | |
| # Node 20 LTS terminó en 2026-04, ya en maintenance. | |
| # Probamos contra LTS activa (22) y la rama actual (24, próxima LTS). | |
| node: ['22', '24'] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # core.autocrlf y line endings: el .gitattributes del repo manda; | |
| # forzamos input para que Windows no convierta CRLF en archivos texto. | |
| with: | |
| fetch-depth: 1 | |
| - name: Setup Node ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: npm | |
| # clang viene preinstalado en macos-latest (Xcode CLT). Para Windows | |
| # hay que añadirlo: GitHub runners traen LLVM en C:\Program Files\LLVM\, | |
| # solo necesita estar en PATH. choco install llvm es alternativa. | |
| - name: Setup clang (Windows only) | |
| if: runner.os == 'Windows' | |
| shell: pwsh | |
| run: | | |
| $llvm = 'C:\Program Files\LLVM\bin' | |
| if (Test-Path $llvm) { | |
| echo $llvm | Out-File -FilePath $env:GITHUB_PATH -Append -Encoding utf8 | |
| Write-Host "LLVM found at $llvm" | |
| } else { | |
| choco install llvm --no-progress -y | |
| } | |
| - name: Verify clang available | |
| run: clang --version | |
| - name: Install deps | |
| run: npm ci | |
| - name: Run tests | |
| run: npm test | |
| - name: Verify fixture builder is idempotente | |
| # Si el builder produce bytes distintos en run-tras-run, los goldens | |
| # se desincronizarían. Verificamos que regenerar los fixtures no rompe. | |
| run: | | |
| node tests/fixtures/builder.mjs | |
| npm test | |
| - name: Smoke test del hook PostToolUse | |
| # Verifica que el hook Node funciona en este OS (sin tocar bash/sh). | |
| # Editar un fichero irrelevante debe ser noop, edit en store ejecuta | |
| # tests y devuelve exit 0 si verde. | |
| shell: node {0} | |
| run: | | |
| import { execSync } from 'node:child_process' | |
| import { resolve } from 'node:path' | |
| const file = resolve('src/renderer/src/store/sceneStore.js') | |
| const payload = JSON.stringify({ tool_name: 'Edit', tool_input: { file_path: file } }) | |
| execSync('node .claude/hooks/run-tests-on-edit.mjs', { | |
| input: payload, stdio: ['pipe', 'inherit', 'inherit'] | |
| }) | |
| console.log('hook OK en', process.platform) |