-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (84 loc) · 3.44 KB
/
Copy pathci.yml
File metadata and controls
95 lines (84 loc) · 3.44 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
name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
verify:
name: typecheck / lint / test / build
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
# ------------------------------------------------------------------
# 1. Check out seabw at $GITHUB_WORKSPACE (default path).
# This lets pnpm-workspace.yaml's relative reference
# ../../side-project/HypurrQuant_FE/worktrees/seabw-integration/packages/*
# resolve to <runner home>/work/side-project/... when we clone HQ
# there in the next step (see HQ_BASE computation).
# ------------------------------------------------------------------
- name: Checkout seabw
uses: actions/checkout@v4
# ------------------------------------------------------------------
# 2. Manually clone HQ worktree to the sibling path that
# pnpm-workspace.yaml expects. actions/checkout can't write
# outside $GITHUB_WORKSPACE, so we use plain git here.
#
# If HypurrQuant_FE is private, register HQ_CLONE_TOKEN in
# repo Settings → Secrets and variables → Actions. PRs from
# forks won't have this secret — the job will fail clearly.
# ------------------------------------------------------------------
- name: Clone HQ worktree
env:
HQ_TOKEN: ${{ secrets.HQ_CLONE_TOKEN }}
run: |
set -euo pipefail
# pnpm-workspace.yaml refers to "../../side-project/..." from the
# seabw repo root, i.e. two levels above $GITHUB_WORKSPACE.
HQ_BASE="$(cd "${GITHUB_WORKSPACE}/../.." && pwd)/side-project/HypurrQuant_FE/worktrees"
HQ_DEST="${HQ_BASE}/seabw-integration"
mkdir -p "${HQ_BASE}"
AUTH=""
if [ -n "${HQ_TOKEN:-}" ]; then
AUTH="x-access-token:${HQ_TOKEN}@"
fi
git clone --depth=1 --branch feat/seabw-integration \
"https://${AUTH}github.com/hypurrquant/HypurrQuant_FE.git" \
"${HQ_DEST}"
echo "HQ cloned to: ${HQ_DEST}"
ls "${HQ_DEST}/packages"
# ------------------------------------------------------------------
# 3. Toolchain
# ------------------------------------------------------------------
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: pnpm
# ------------------------------------------------------------------
# 4. Install
# ------------------------------------------------------------------
- name: Install dependencies
run: pnpm install --frozen-lockfile
# ------------------------------------------------------------------
# 5. Gates (run sequentially so failures surface clearly)
# ------------------------------------------------------------------
- name: Typecheck
run: pnpm typecheck
- name: Lint
run: pnpm lint
- name: Unit tests
run: pnpm test
- name: Build (demo env)
env:
NEXT_PUBLIC_DEFIPILOT_ENV: demo
DEFIPILOT_ENV: demo
DEFIPILOT_DEMO_BANNER: "true"
NEXT_PUBLIC_DEFAULT_CHAIN_ID: "8453"
NEXT_PUBLIC_HQ_ORIGIN: http://localhost:3003
NEXT_PUBLIC_HQ_BASE_URL: http://localhost:3003/api/v1
run: pnpm build