Intelligence, Advanced Charting & Trading Platform

1 name: Paper Trading - Safe Simulation CI
2
3 on:
4 pull_request:
5 workflow_dispatch:
6
7 permissions:
8 contents: read
9
10 jobs:
11 simulation:
12 runs-on: ubuntu-latest
13 timeout-minutes: 12
14 steps:
15 - uses: actions/checkout@v4
16 - uses: actions/setup-node@v4
17 with:
18 node-version: '22'
19 - name: Verify paper position unit tests
20 run: node --test packages/market-domain/test/paper-*.test.mjs
21 - name: Guard pure module against broker/network imports
22 shell: bash
23 run: |
24 if grep -Ein '(from|import).*([@/](ccxt|broker|exchange|trading|ethers|web3)|node:(http|https|net|child_process))|\b(fetch|WebSocket|XMLHttpRequest|placeOrder|submitOrder|executeOrder)\s*\(' packages/market-domain/src/paper-position.mjs packages/market-domain/src/paper-workspace.mjs packages/market-domain/src/paper-quote-guard.mjs; then
25 echo "Paper-position module unexpectedly calls networking/broker APIs." >&2
26 exit 1
27 fi
28 - name: Install standalone terminal dependencies
29 working-directory: apps/market-terminal
30 run: npm ci --no-audit --no-fund
31 - name: Build Vite terminal with paper panel
32 working-directory: apps/market-terminal
33 run: npm run build