-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1.12 KB
/
ci-node.yml
File metadata and controls
48 lines (39 loc) · 1.12 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
# .github/workflows/ci-node.yml
name: CI (Node reusable)
# CI PHASES A-B-C-D:
# - Assemble: Install dependencies, verify environment setup
# - Baseline: Core validation (types exist, lint passes, tests pass)
# - Coverage: Generate coverage / testing reports
# - Deploy: Build package and docs (sanity checks for release readiness)
on:
workflow_call:
permissions:
contents: read
jobs:
ci:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: A1) Checkout
uses: actions/checkout@v6
- name: A2) Setup Node
uses: actions/setup-node@v6
with:
node-version: "24"
cache: "npm"
- name: A3) Install dependencies
run: npm ci
- name: C1) Run tests (if defined)
run: |
if npm run | grep -q " test"; then
npm test
else
echo "No test script defined; skipping npm test."
fi
- name: D1) Build (if defined)
run: |
if npm run | grep -q " build"; then
npm run build
else
echo "No build script defined; skipping npm run build."
fi