-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (46 loc) · 1.37 KB
/
Copy pathtest.yml
File metadata and controls
50 lines (46 loc) · 1.37 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
name: Test
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
js:
name: JS unit tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm test
mcp:
name: MCP bridge tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 22
# npm test は tsc を通してから走るので、型が壊れた変更もここで落ちる
- run: npm ci
working-directory: mcp
- run: npm test
working-directory: mcp
go:
name: Go tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
# ripgrep が無いと検索経路のテストが黙って skip される
- name: Install ripgrep
run: sudo apt-get update && sudo apt-get install -y ripgrep
- run: go vet ./...
# -race: ロックの外で JSON 化する類の競合は普通のテストでは表に出ない
- run: go test -race ./...
# 未使用コード (U1000) まで見る。バージョンは固定し、更新は明示的に行う
- name: Staticcheck
run: go run honnef.co/go/tools/cmd/staticcheck@2025.1 ./...