Skip to content

Commit a108716

Browse files
authored
Merge pull request #2464 from goplus/dev
Release v1.11.8
2 parents b744188 + b2e7709 commit a108716

File tree

101 files changed

+3585
-2078
lines changed

Some content is hidden

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

101 files changed

+3585
-2078
lines changed

.github/agents/spx-upgrader.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: spx-upgrader
3+
description: Keeps every spx reference in goplus/builder aligned with the requested release
4+
---
5+
6+
You are a release specialist dedicated to upgrading spx across goplus/builder safely and consistently. Your responsibilities:
7+
8+
- Require the requester to specify the target spx version, and stop immediately with an error message if it is missing
9+
- Parse the requested spx version and verify it exists by running `gh release view --repo goplus/spx v<version>`
10+
- Update `spx-gui/.env` and `spx-gui/install-spx.sh` so `VITE_SPX_VERSION` and `SPX_VERSION` match the target
11+
- Refresh Go modules in `tools/ai/` and `tools/spxls/` via `go get github.com/goplus/spx/v2@v<version>` followed by `go mod tidy`
12+
- Execute `bash spx-gui/install-spx.sh` to download the matching `spx_web.zip` and remove any temporary archives
13+
- Execute `bash build-wasm.sh` in `spx-gui/` to build Wasm components
14+
- Run `npm ci`, `npm run lint`, `npm run test -- --run` in `spx-gui/`, plus `go test ./...` inside `tools/ai/` and `tools/spxls/`
15+
- Verify `git status` is clean beyond the expected files, then create a commit titled `chore(deps): bump spx to <version>` and draft a PR with release notes and validation logs
16+
- If any command fails, stop immediately and report the exact output instead of continuing
17+
18+
Always ensure every file referencing spx (env, install script, Go modules, generated assets) reflects the same version before requesting review.

.github/workflows/publish-docker-image.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
name: Publish Docker image
22
on:
33
push:
4-
branches:
5-
- dev
4+
pull_request:
65
jobs:
76
publish-docker-image:
87
runs-on: ubuntu-latest
98
steps:
109
- name: Check out code
1110
uses: actions/checkout@v5
11+
- name: Set up Docker Buildx
12+
uses: docker/setup-buildx-action@v3
1213
- name: Configure spx-gui to use co-located spx-backend
1314
run: echo "VITE_API_BASE_URL=/api" > ./spx-gui/.env.staging.local
1415
- name: Log in to GitHub Container Registry
@@ -23,6 +24,8 @@ jobs:
2324
context: .
2425
build-args: |
2526
NODE_ENV=staging
26-
push: true
27+
cache-from: type=gha
28+
cache-to: type=gha,mode=max
29+
push: ${{ github.event_name == 'push' && github.ref_name == 'dev' }}
2730
tags: |
2831
ghcr.io/${{github.repository}}:dev

.github/workflows/validate.yml

Lines changed: 41 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,22 @@ on:
77
jobs:
88
spx-gui-lint:
99
runs-on: ubuntu-latest
10+
defaults:
11+
run:
12+
working-directory: spx-gui
1013
steps:
1114
- uses: actions/checkout@v5
1215

16+
- name: Cache Node modules
17+
uses: actions/cache@v4
18+
env:
19+
cache-name: cache-node-modules
20+
with:
21+
path: spx-gui/node_modules
22+
key: ${{runner.os}}-${{runner.arch}}-${{env.cache-name}}-${{hashFiles('spx-gui/package-lock.json')}}
23+
restore-keys: |
24+
${{runner.os}}-${{runner.arch}}-${{env.cache-name}}-
25+
1326
- name: Enable Corepack
1427
run: corepack enable
1528

@@ -20,68 +33,82 @@ jobs:
2033
cache: npm
2134
cache-dependency-path: spx-gui/package-lock.json
2235

23-
- name: Install modules
24-
working-directory: spx-gui
25-
run: npm install
36+
- name: Install Node modules
37+
run: npm install --prefer-offline
2638

2739
- name: Install spx
28-
working-directory: spx-gui
2940
run: ./install-spx.sh
3041

3142
- name: Run Vue TSC
32-
working-directory: spx-gui
3343
run: npm run type-check
3444

3545
- name: Run ESLint
36-
working-directory: spx-gui
3746
run: npm run lint
3847

3948
- name: Run format check
40-
working-directory: spx-gui
4149
run: npm run format-check
4250

4351
- name: Setup Go
4452
uses: actions/setup-go@v6
4553
with:
4654
go-version: 1.24.x
55+
cache: true
56+
cache-dependency-path: |
57+
tools/spxls/go.sum
58+
tools/ai/go.sum
4759
4860
- name: Build WASM
49-
working-directory: spx-gui
5061
run: ./build-wasm.sh
5162

5263
- name: Run Vitest
53-
working-directory: spx-gui
5464
run: npm run test
5565

5666
- name: Build
57-
working-directory: spx-gui
5867
run: npm run build
5968

6069
spx-backend-test:
6170
runs-on: ubuntu-latest
71+
defaults:
72+
run:
73+
working-directory: spx-backend
6274
steps:
6375
- uses: actions/checkout@v5
6476

65-
- name: Set up Go & XGo
66-
uses: goplus/setup-xgo@v1
77+
- name: Setup Go
78+
uses: actions/setup-go@v6
6779
with:
6880
go-version: 1.24.x
81+
cache: true
82+
cache-dependency-path: spx-backend/go.sum
83+
84+
- name: Set up XGo
85+
uses: goplus/setup-xgo@v1
86+
with:
6987
xgo-version: 1.5.x
7088

89+
- name: Ensure xgo mod tidy is clean
90+
working-directory: spx-backend/cmd/spx-backend
91+
run: |
92+
xgo mod tidy
93+
git diff --exit-code
94+
7195
- name: Run unit test cases
72-
working-directory: spx-backend
7396
run: go test -v -race ./...
7497

7598
tools-ai-test:
7699
runs-on: ubuntu-latest
100+
defaults:
101+
run:
102+
working-directory: tools/ai
77103
steps:
78104
- uses: actions/checkout@v5
79105

80106
- name: Setup Go
81107
uses: actions/setup-go@v6
82108
with:
83109
go-version: 1.24.x
110+
cache: true
111+
cache-dependency-path: tools/ai/go.sum
84112

85113
- name: Run unit test cases
86-
working-directory: tools/ai
87114
run: go test -v -race ./...

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ COPY --from=xgo-builder /app/spx-backend/spx-backend /app/spx-backend/spx-backen
6666
COPY --from=frontend-builder /app/spx-gui/dist /usr/share/nginx/html
6767
COPY scripts/nginx.conf /etc/nginx/conf.d/default.conf
6868

69+
# Validate Nginx configuration
70+
RUN nginx -t
71+
6972
# Compress WASM files for gzip_static
7073
RUN find /usr/share/nginx/html -name "*.wasm" -exec gzip -9 -k {} \;
7174

0 commit comments

Comments
 (0)