-
Notifications
You must be signed in to change notification settings - Fork 35
92 lines (74 loc) · 2.02 KB
/
Copy pathci.yml
File metadata and controls
92 lines (74 loc) · 2.02 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
89
90
91
92
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
lint:
name: Lint & Type Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- name: Audit dependencies
# Gate ALL dependencies (prod + dev) at high severity. Transitive advisories
# inside dev tooling (@earendil-works/pi-coding-agent → @google/genai →
# protobufjs/ws) are pinned to patched versions via `overrides`, so the full
# tree is clean — no need to scope dev out.
run: npm audit --audit-level=high
- name: Run ESLint
run: npm run lint
- name: Run TypeScript type check
run: npm run typecheck
test:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- name: Run tests
run: npm run test:run
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: '24'
cache: 'npm'
- run: npm ci
- name: Build
run: npm run build
- name: Upload build artifacts
uses: actions/upload-artifact@v7
with:
name: dist
path: dist/
retention-days: 7
ci-success:
name: CI Success
runs-on: ubuntu-latest
needs: [lint, test, build]
if: always()
steps:
- name: Check all jobs passed
run: |
if [[ "${{ needs.lint.result }}" != "success" ]] || \
[[ "${{ needs.test.result }}" != "success" ]] || \
[[ "${{ needs.build.result }}" != "success" ]]; then
echo "One or more required jobs failed"
exit 1
fi
echo "All required jobs passed!"