Skip to content

Commit 98bc87f

Browse files
committed
chore: 清理文档并更新构建配置与产物
1. 删除了大量旧文档文件(设计、流程、架构相关文档) 2. 更新了.env、docker-compose.yml、Dockerfile等构建配置 3. 添加了预移除、postinstall脚本和桌面启动配置 4. 更新了web页面资源与版本信息 5. 新增了部分运行时chunk与图表组件文件
1 parent e736d2b commit 98bc87f

126 files changed

Lines changed: 5361 additions & 19887 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.env

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
2-
# Environment variables for Bot application
3-
# MINDX_WORKSPACE=/Users/ray/workspaces/ai-ecosystem/mindx/runtime
4-
# MINDX_PWD_PATH=/Users/ray/workspaces/ai-ecosystem/mindx/runtime
5-
MINDX_WS_ADDR=":1314"
6-
MINDX_WS_PATH="/ws"
7-
MINDX_MASTER="personal-assistant"
8-
#TIKTOKEN_CACHE_DIR=""
9-
#DATA_GYM_CACHE_DIR=""
1+
# Auto-generated from git
2+
MINDX_VERSION=v2.0.3
3+
MINDX_COMMIT=e736d2b
4+
MINDX_BUILD_TIME=2026-06-07T00:50:52Z

.github/workflows/ci.yml

Lines changed: 213 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,48 +1,236 @@
1+
# =============================================================================
2+
# MindX CI Pipeline — Production-grade GitHub Actions
3+
# =============================================================================
4+
# Stages: lint → vet → security → test (race + coverage) → build (matrix)
5+
#
6+
# Triggers:
7+
# - push to main/develop, all PRs
8+
# - manual dispatch for debugging
9+
# =============================================================================
10+
111
name: CI
212

313
on:
414
push:
5-
branches: [main]
15+
branches: [main, develop]
16+
paths-ignore:
17+
- '**.md'
18+
- 'docs/**'
19+
- 'LICENSE'
20+
- '.all-contributorsrc'
621
pull_request:
7-
branches: [main]
22+
branches: [main, develop]
23+
workflow_dispatch:
24+
25+
# Cancel in-progress runs on the same branch/PR
26+
concurrency:
27+
group: ${{ github.workflow }}-${{ github.ref }}
28+
cancel-in-progress: true
29+
30+
# ==========================================================================
31+
# Environment defaults
32+
# ==========================================================================
33+
env:
34+
GO_VERSION: '1.26'
35+
CGO_ENABLED: 0
36+
GOLANGCI_LINT_VERSION: v2.9
37+
MINDX_WORKSPACE: ${{ github.workspace }}/.test
838

939
jobs:
10-
backend:
40+
# ==========================================================================
41+
# Stage 1: Lint — golangci-lint with project config
42+
# ==========================================================================
43+
lint:
44+
name: Lint
1145
runs-on: ubuntu-latest
1246
steps:
13-
- uses: actions/checkout@v4
47+
- name: Checkout
48+
uses: actions/checkout@v4
49+
50+
- name: Set up Go
51+
uses: actions/setup-go@v6
52+
with:
53+
go-version: ${{ env.GO_VERSION }}
54+
cache: true
1455

15-
- uses: actions/setup-go@v5
56+
- name: golangci-lint
57+
uses: golangci/golangci-lint-action@v9
1658
with:
17-
go-version-file: go.mod
59+
version: ${{ env.GOLANGCI_LINT_VERSION }}
60+
args: --timeout=5m
1861

19-
- name: Vet
62+
# ==========================================================================
63+
# Stage 2: Vet — static analysis
64+
# ==========================================================================
65+
vet:
66+
name: Vet
67+
runs-on: ubuntu-latest
68+
steps:
69+
- name: Checkout
70+
uses: actions/checkout@v4
71+
72+
- name: Set up Go
73+
uses: actions/setup-go@v6
74+
with:
75+
go-version: ${{ env.GO_VERSION }}
76+
cache: true
77+
78+
- name: Run go vet
2079
run: go vet ./...
2180

81+
# ==========================================================================
82+
# Stage 3: Security — vulnerability check
83+
# ==========================================================================
84+
security:
85+
name: Security
86+
runs-on: ubuntu-latest
87+
steps:
88+
- name: Checkout
89+
uses: actions/checkout@v4
90+
91+
- name: Set up Go
92+
uses: actions/setup-go@v6
93+
with:
94+
go-version: ${{ env.GO_VERSION }}
95+
cache: true
96+
97+
- name: Install govulncheck
98+
run: go install golang.org/x/vuln/cmd/govulncheck@latest
99+
100+
- name: Run govulncheck
101+
run: govulncheck ./...
102+
103+
# ==========================================================================
104+
# Stage 4: Test — race detector + coverage (matrix: OS)
105+
# ==========================================================================
106+
test:
107+
name: Test (${{ matrix.os }})
108+
runs-on: ${{ matrix.os }}
109+
needs: [lint, vet]
110+
strategy:
111+
fail-fast: false
112+
matrix:
113+
os: [ubuntu-latest, macos-latest, windows-latest]
114+
env:
115+
CGO_ENABLED: 1 # race detector requires CGO
116+
steps:
117+
- name: Checkout
118+
uses: actions/checkout@v4
119+
120+
- name: Set up Go
121+
uses: actions/setup-go@v6
122+
with:
123+
go-version: ${{ env.GO_VERSION }}
124+
cache: true
125+
22126
- name: Prepare test workspace
23-
run: cp -r config .test/config
127+
run: |
128+
mkdir -p .test
129+
cp -r config .test/config 2>/dev/null || true
24130
shell: bash
25131

26-
- name: Test
27-
run: go test ./...
132+
- name: Run tests with race detector & coverage
133+
run: |
134+
go test \
135+
-race \
136+
-coverprofile=coverage.out \
137+
-covermode=atomic \
138+
-timeout=10m \
139+
-v ./... 2>&1 | tee test-output.txt
28140
env:
29-
MINDX_WORKSPACE: ${{ github.workspace }}/.test
141+
MINDX_WORKSPACE: ${{ env.MINDX_WORKSPACE }}
30142

31-
frontend:
32-
runs-on: ubuntu-latest
33-
defaults:
34-
run:
35-
working-directory: dashboard
143+
- name: Display coverage summary
144+
if: runner.os != 'Windows'
145+
run: go tool cover -func=coverage.out | tail -1
146+
147+
- name: Upload coverage artifact
148+
if: matrix.os == 'ubuntu-latest'
149+
uses: actions/upload-artifact@v4
150+
with:
151+
name: coverage-report
152+
path: coverage.out
153+
retention-days: 7
154+
155+
- name: Upload test output
156+
if: always()
157+
uses: actions/upload-artifact@v4
158+
with:
159+
name: test-output-${{ matrix.os }}
160+
path: test-output.txt
161+
retention-days: 7
162+
163+
# ==========================================================================
164+
# Stage 5: Build verification (matrix: OS + Arch)
165+
# ==========================================================================
166+
build:
167+
name: Build (${{ matrix.goos }}/${{ matrix.goarch }})
168+
runs-on: ${{ matrix.runner }}
169+
needs: [test]
170+
strategy:
171+
fail-fast: false
172+
matrix:
173+
include:
174+
- goos: linux
175+
goarch: amd64
176+
runner: ubuntu-latest
177+
- goos: linux
178+
goarch: arm64
179+
runner: ubuntu-latest
180+
- goos: darwin
181+
goarch: amd64
182+
runner: ubuntu-latest
183+
- goos: darwin
184+
goarch: arm64
185+
runner: ubuntu-latest
186+
- goos: windows
187+
goarch: amd64
188+
runner: ubuntu-latest
189+
env:
190+
CGO_ENABLED: 0
36191
steps:
37-
- uses: actions/checkout@v4
192+
- name: Checkout
193+
uses: actions/checkout@v4
38194

39-
- uses: actions/setup-node@v4
195+
- name: Set up Go
196+
uses: actions/setup-go@v6
40197
with:
41-
node-version: 20
42-
cache: npm
43-
cache-dependency-path: dashboard/package-lock.json
198+
go-version: ${{ env.GO_VERSION }}
199+
cache: true
200+
201+
- name: Get version info
202+
id: version
203+
run: |
204+
echo "version=$(git describe --tags --abbrev=0 2>/dev/null || echo 'dev')" >> "$GITHUB_OUTPUT"
205+
echo "commit=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
206+
echo "build_time=$(date -u '+%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT"
207+
208+
- name: Build
209+
env:
210+
GOOS: ${{ matrix.goos }}
211+
GOARCH: ${{ matrix.goarch }}
212+
run: |
213+
BINARY_NAME=mindx
214+
VERSION=${{ steps.version.outputs.version }}
215+
COMMIT=${{ steps.version.outputs.commit }}
216+
BUILD_TIME=${{ steps.version.outputs.build_time }}
217+
SUFFIX=""
218+
[ "${{ matrix.goos }}" = "windows" ] && SUFFIX=".exe"
219+
220+
go build \
221+
-trimpath \
222+
-ldflags="-s -w \
223+
-X github.com/DotNetAge/mindx/cmd.Version=${VERSION#v} \
224+
-X github.com/DotNetAge/mindx/cmd.Commit=${COMMIT} \
225+
-X github.com/DotNetAge/mindx/cmd.BuildTime=${BUILD_TIME}" \
226+
-o dist/${BINARY_NAME}-${{ matrix.goos }}-${{ matrix.goarch }}${SUFFIX} \
227+
.
44228
45-
- run: npm ci
46-
- run: npm run lint
47-
- run: npx tsc --noEmit
48-
- run: npm run test
229+
ls -lh dist/
230+
231+
- name: Upload build artifact
232+
uses: actions/upload-artifact@v4
233+
with:
234+
name: mindx-${{ matrix.goos }}-${{ matrix.goarch }}
235+
path: dist/
236+
retention-days: 7

0 commit comments

Comments
 (0)