Repository navigation
88 lines (76 loc) · 2.56 KB
/
Copy pathci.yml
File metadata and controls
88 lines (76 loc) · 2.56 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
jobs:
# ── 1. Detección de Cambios ────────────────────────────────────────────────
changes:
runs-on: ubuntu-latest
outputs:
lib: ${{ steps.filter.outputs.lib }}
demo: ${{ steps.filter.outputs.demo }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
lib:
- 'projects/ngx-theme-stack/**'
- 'package.json'
- 'pnpm-lock.yaml'
- '.github/workflows/ci.yml'
demo:
- 'projects/demo-ngx-theme-stack/**'
- 'projects/ngx-theme-stack/**'
- 'package.json'
- 'pnpm-lock.yaml'
- '.github/workflows/ci.yml'
# ── 2. Job para la Librería ────────────────────────────────────────────────
library:
needs: changes
if: ${{ needs.changes.outputs.lib == 'true' }}
name: Test & Build Library
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.30.3
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run Linter
run: pnpm exec ng lint ngx-theme-stack
- name: Run Unit Tests
run: pnpm exec ng test ngx-theme-stack --watch=false
- name: Build Library
run: pnpm exec ng build ngx-theme-stack
# ── 3. Job para la Demo ───────────────────────────────────────────────────
demo:
needs: changes
if: ${{ needs.changes.outputs.demo == 'true' }}
name: Build Demo App
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 10.30.3
- uses: actions/setup-node@v4
with:
node-version: '24'
cache: 'pnpm'
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build Library (required for schematics)
run: pnpm run build:lib
- name: Build Demo
run: pnpm run build:demo