forked from kalzakath1/agemki
-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (62 loc) · 2.49 KB
/
Copy pathtest.yml
File metadata and controls
72 lines (62 loc) · 2.49 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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
- 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)