-
Notifications
You must be signed in to change notification settings - Fork 111
106 lines (89 loc) · 2.95 KB
/
Copy pathci.yml
File metadata and controls
106 lines (89 loc) · 2.95 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
name: CI
on:
push:
branches: [main, "feat/**", "fix/**"]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
# ── Smart contract ────────────────────────────────────────────────────────
contract:
name: Contract (Rust / Soroban)
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
components: rustfmt, clippy
- uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- run: cargo fmt --all -- --check
- run: cargo clippy --target wasm32-unknown-unknown --release -- -D warnings
- run: cargo test
- run: cargo build --target wasm32-unknown-unknown --release
- name: Record wasm SHA-256
run: sha256sum target/wasm32-unknown-unknown/release/niffyinsure.wasm | tee niffyinsure.wasm.sha256
- uses: actions/upload-artifact@v4
with:
name: niffyinsure-wasm-${{ github.sha }}
path: |
target/wasm32-unknown-unknown/release/niffyinsure.wasm
niffyinsure.wasm.sha256
retention-days: 30
# ── Backend ───────────────────────────────────────────────────────────────
backend:
name: Backend (Node / TypeScript)
runs-on: ubuntu-latest
defaults:
run:
working-directory: backend
services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 5s
--health-timeout 3s
--health-retries 5
--health-start-period 5s
env:
REDIS_HOST: 127.0.0.1
REDIS_PORT: 6379
NODE_ENV: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm install
- run: npm run lint
- run: npm run build
- run: npm test
# ── Frontend ──────────────────────────────────────────────────────────────
frontend:
name: Frontend (Next.js / TypeScript)
runs-on: ubuntu-latest
defaults:
run:
working-directory: frontend
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: frontend/package-lock.json
- run: npm ci
- run: npm run lint
- run: npm run build
- run: npm test