-
-
Notifications
You must be signed in to change notification settings - Fork 171
100 lines (84 loc) · 2.17 KB
/
test.yml
File metadata and controls
100 lines (84 loc) · 2.17 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
name: Test and Lint
on:
push:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**'
- 'changelog/**'
pull_request:
branches: [ main ]
paths-ignore:
- '**.md'
- 'docs/**'
- 'changelog/**'
jobs:
web-test-lint:
name: Web Tests and Lint
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '22.12.0'
- name: Install pnpm
run: npm install -g pnpm@9.15.0
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- name: Setup pnpm cache
uses: actions/cache@v3
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: |
cd web
pnpm install --frozen-lockfile
- name: Run ESLint
run: |
cd web
pnpm run lint
- name: Build web (dry run)
run: |
cd web
pnpm run build
go-tests:
name: Go Tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.25.0'
cache: true
- name: Run Go Tests and Coverage
run: make test-coverage TEST_FLAGS="-v -race"
- name: Upload coverage report
uses: codecov/codecov-action@v3
with:
files: coverage.out
name: go-coverage
fail_ci_if_error: false
build-check:
name: Build Check
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.25.0'
- name: Check if builds succeed
run: |
go build -v ./cmd/apiserver
go build -v ./cmd/mcp-gateway
go build -v ./cmd/mock-server