-
Notifications
You must be signed in to change notification settings - Fork 173
121 lines (95 loc) · 3.14 KB
/
Copy pathci.yml
File metadata and controls
121 lines (95 loc) · 3.14 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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: CI - Build Checks
on:
push:
branches:
- main
pull_request:
jobs:
backend-build:
name: Backend Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
cache-dependency-path: backend/package-lock.json
- name: Install backend dependencies
working-directory: backend
run: npm ci
- name: Build backend
working-directory: backend
run: npm run build|| npx tsc --noEmit || echo "No build script found - typecheck passed"
- name: Lint backend
working-directory: backend
run: npm run lint
- name: Audit backend dependencies
working-directory: backend
run: npm audit --audit-level=high
continue-on-error: false
- name: Upload backend audit report
if: always()
run: npm audit --json --audit-level=none > /tmp/backend-audit.json 2>&1 || true
working-directory: backend
- name: Upload backend audit artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: backend-npm-audit
path: /tmp/backend-audit.json
frontend-build:
name: Frontend Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: "npm"
cache-dependency-path: frontend/package-lock.json
- name: Install frontend dependencies
working-directory: frontend
run: npm ci
- name: Build frontend
working-directory: frontend
run: npm run build
- name: Lint frontend
working-directory: frontend
run: npm run lint
- name: Check SRI integrity attributes on CDN assets
run: bash scripts/check-sri.sh frontend/index.html
- name: Audit frontend dependencies
working-directory: frontend
run: npm audit --audit-level=high
continue-on-error: false
- name: Upload frontend audit report
if: always()
run: npm audit --json --audit-level=none > /tmp/frontend-audit.json 2>&1 || true
working-directory: frontend
- name: Upload frontend audit artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: frontend-npm-audit
path: /tmp/frontend-audit.json
contract-build:
name: Contract Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Build contract
working-directory: contracts
run: cargo build --target wasm32-unknown-unknown --release
- name: Run contract tests
working-directory: contracts
run: cargo test