-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (61 loc) · 1.9 KB
/
Copy pathci.yml
File metadata and controls
71 lines (61 loc) · 1.9 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
test:
name: Tests (Node ${{ matrix.node }})
runs-on: ubuntu-latest
strategy:
matrix:
node: ['18', '20', '22']
steps:
- uses: actions/checkout@v4
- name: Setup Node.js ${{ matrix.node }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
- name: Lint (parse-check)
run: |
node --check bin/libroforge.js
for f in lib/*.js; do node --check "$f"; done
node --check templates/hooks/handler.cjs
- name: Validate profiles
run: |
for d in profiles/*/; do
id="$(basename "$d")"
# Skip internal dirs (start with _, e.g. _fallback)
[[ "$id" == _* ]] && continue
node bin/libroforge.js profile validate "$id"
done
- name: Unit tests
run: bash tests/run-all.sh
- name: Smoke (init + audit)
run: bash scripts/verify.sh
npx-smoke:
name: npx github:… smoke
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
with:
path: libroforge
- uses: actions/setup-node@v4
with:
node-version: '20'
- name: Simula `npx github:devwspito/libroforge init` desde el checkout
run: |
mkdir -p /tmp/test-libro
# Mismo efecto que npx github:... — ejecuta el bin desde el repo clonado
node libroforge/bin/libroforge.js init /tmp/test-libro \
--profile oposiciones-es \
--topic "CI smoke" \
--chapters 3
test -f /tmp/test-libro/CLAUDE.md
test -f /tmp/test-libro/.claude/agents/orchestrator.md
test -f /tmp/test-libro/.claude/hooks/handler.cjs
test -f /tmp/test-libro/profile.json
echo "✓ npx-style init OK"