-
Notifications
You must be signed in to change notification settings - Fork 120
125 lines (102 loc) · 3.78 KB
/
Copy pathci.yml
File metadata and controls
125 lines (102 loc) · 3.78 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
122
123
124
125
name: CI
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
ci:
name: test + validate + build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
# Node 24 matches the maintainer's local toolchain. The test suite
# imports dashboard .ts files directly (native type stripping, Node
# 22.18+) and exercises undici 8 (needs webidl.markAsUncloneable), so
# Node 20 cannot run the suite even though the published CLI targets it.
node-version: 24
cache: npm
cache-dependency-path: |
package-lock.json
dashboard/package-lock.json
- name: Install root dependencies
run: npm ci
- name: Install dashboard dependencies
run: npm ci --prefix dashboard
# Build the dashboard up front: the local-runtime install test asserts the
# bundled dashboard/dist/index.html exists, and a fresh checkout has none.
# VITE_* are public client-side values shipped in every dashboard bundle;
# absent at build time Vite inlines empty strings and breaks leaderboard
# fetch + cloud OAuth. dashboard/.env.local is gitignored, hence inlined here.
- name: Build dashboard
env:
VITE_INSFORGE_BASE_URL: https://srctyff5.us-east.insforge.app
VITE_INSFORGE_ANON_KEY: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3OC0xMjM0LTU2NzgtOTBhYi1jZGVmMTIzNDU2NzgiLCJlbWFpbCI6ImFub25AaW5zZm9yZ2UuY29tIiwicm9sZSI6ImFub24iLCJpYXQiOjE3ODExNDU5NDd9.T0auta_IrVIh0uXW1bob5QSnzvsnJmN28r5XkSGEuQY
run: npm run dashboard:build
- name: Test dashboard limits preferences
run: npm --prefix dashboard test -- src/hooks/use-limits-display-prefs.test.js
# Same checks as `npm run ci:local`, with the dashboard build hoisted above.
- name: Test and validate
run: |
npm test
npm run validate:copy
npm run validate:locale
npm run validate:ui-hardcode
npm run validate:guardrails
node --test test/architecture-guardrails.test.js
macos-tests:
name: macOS unit tests
runs-on: macos-26
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- name: Test OpenClaw parser on macOS
run: |
npm ci
node --test test/openclaw-parser.test.js
- name: Install xcodegen
run: brew install xcodegen
- name: Generate Xcode project
working-directory: TokenTrackerBar
run: xcodegen generate
- name: Patch pbxproj for icon
working-directory: TokenTrackerBar
run: ruby scripts/patch-pbxproj-icon.rb
- name: Test TokenTrackerBar
working-directory: TokenTrackerBar
run: |
xcodebuild test \
-scheme TokenTrackerBarTests \
-destination 'platform=macOS'
windows-build:
name: Windows build
runs-on: windows-latest
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: actions/setup-dotnet@v6
with:
dotnet-version: 8.0.x
- uses: actions/setup-node@v7
with:
node-version: 24
cache: npm
- name: Test OpenClaw parser on Windows
run: |
npm ci
node --test test/openclaw-parser.test.js
- name: Test Windows updater
run: dotnet test TokenTrackerWin.Tests/TokenTrackerWin.Tests.csproj --configuration Release
- name: Build TokenTrackerWin
run: dotnet build TokenTrackerWin/TokenTrackerWin.csproj --configuration Release