-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (86 loc) · 2.86 KB
/
Copy pathci.yml
File metadata and controls
104 lines (86 loc) · 2.86 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
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test-js-python:
name: build-and-test-js-python (24.x, ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [24.15.0]
python-version: [3.11]
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Setup Python (early)
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Install canonical Python test dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r backend/python/requirements-test.txt
- name: Setup Node.js
uses: actions/setup-node@v7
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Cache node modules
uses: actions/cache@v6
with:
path: |
**/node_modules
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json', '**/package.json') }}
restore-keys: |
${{ runner.os }}-node-${{ matrix.node-version }}-
- name: Install root npm dependencies
run: npm ci
- name: Install frontend dependencies
working-directory: frontend
run: npm ci
- name: Run JS runtime tests
run: npm run test:node
- name: Build frontend
working-directory: frontend
run: npm run build
- name: Typecheck frontend
working-directory: frontend
run: npm run typecheck
- name: Secret Scan (Gitleaks)
uses: gitleaks/gitleaks-action@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Node audit (advisory)
run: |
echo "ADVISORY ONLY: this audit is non-blocking by design."
if ! npm audit --audit-level=moderate; then
echo "npm audit reported findings or returned a non-zero exit code."
fi
- name: Validate public demo readiness
run: npm run validate:public-demo
rust-tests:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run cargo tests
working-directory: backend/rust
run: cargo test --locked --all
- name: Cargo audit (advisory)
run: |
echo "ADVISORY ONLY: this audit is non-blocking by design."
if ! cargo install --locked cargo-audit; then
echo "cargo-audit installation failed; leaving this advisory audit non-blocking."
exit 0
fi
cd backend/rust
if ! cargo audit; then
echo "cargo audit reported findings or returned a non-zero exit code."
fi