-
Notifications
You must be signed in to change notification settings - Fork 9
50 lines (46 loc) · 1.53 KB
/
Copy pathci.yml
File metadata and controls
50 lines (46 loc) · 1.53 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
name: CI
# Backstop vendor-neutral: los gates corren en cada push/PR sin importar qué IDE/IA usó
# quien escribió el código. Es la última red si alguien no tiene el pre-commit local.
on:
push:
branches: [main]
pull_request:
# Permisos mínimos: el workflow sólo lee el repo (no escribe nada).
permissions:
contents: read
# Cancela corridas viejas del mismo ref cuando llega un push nuevo (no malgastar runners).
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
gates:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- run: npm ci
# Cachea la build incremental de Angular: cambiar un spec no recompila todo.
- name: Cache Angular build
uses: actions/cache@v4
with:
path: .angular/cache
key: angular-cache-${{ runner.os }}-${{ hashFiles('package-lock.json') }}
restore-keys: |
angular-cache-${{ runner.os }}-
- name: Formato (Prettier, sin errores de indentación)
run: npm run format:check
- name: Boundaries (regla de oro, self-test)
run: npm run lint:boundaries
- name: Lint (no-console, OnPush, a11y de teclado)
run: npm run lint
- name: Tests
run: npm test
- name: Metrics drift check (README test count)
run: |
node scripts/update-metrics.mjs
git diff --exit-code README.md
- name: Build
run: npm run build