-
Notifications
You must be signed in to change notification settings - Fork 9
64 lines (52 loc) · 1.35 KB
/
Copy pathci.yml
File metadata and controls
64 lines (52 loc) · 1.35 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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
go:
name: Go build & test
runs-on: ubuntu-latest
defaults:
run:
working-directory: mcp-server
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "1.26"
cache-dependency-path: mcp-server/go.sum
# The Go binary embeds web/dist via embed.FS, so a placeholder must
# exist for `go build`/`go test` to compile without a full SPA build.
- name: Create web/dist placeholder
run: |
mkdir -p web/dist
echo '<!doctype html><title>enowx-rag</title>' > web/dist/index.html
- name: go vet
run: go vet ./...
- name: go build
run: go build ./...
- name: go test
run: go test ./... -count=1
web:
name: Frontend build
runs-on: ubuntu-latest
defaults:
run:
working-directory: mcp-server/web
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: mcp-server/web/package-lock.json
- name: Install dependencies
run: npm ci
- name: Build SPA
run: npm run build