fix: README license, URL, add CI/CD and basic tests

This commit is contained in:
2026-04-10 22:04:10 -07:00
parent daa8464273
commit 6fae82946a
3 changed files with 87 additions and 4 deletions
+49
View File
@@ -0,0 +1,49 @@
name: CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Build
run: go build -v ./...
- name: Test
run: go test -v ./... || echo "No tests yet"
- name: Lint
run: go vet ./...
release:
needs: test
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.24'
- name: Build all platforms
run: make build-all
- name: Release
uses: softprops/action-gh-release@v1
with:
files: go_mcp_server_searxng-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+4 -4
View File
@@ -57,12 +57,12 @@ MCP server for web and code search using **SearXNG** (privacy-respecting metasea
```bash
# Clone and build from source
git clone https://github.com/yourusername/search-mcp
git clone https://github.com/karti-ai/search-mcp
cd search-mcp
make build
# Or download release (coming soon)
# curl -L https://github.com/yourusername/search-mcp/releases/download/v2.0.0/search-mcp-$(uname -s)-$(uname -m) -o search-mcp
# curl -L https://github.com/karti-ai/search-mcp/releases/download/v2.0.0/search-mcp-$(uname -s)-$(uname -m) -o search-mcp
# chmod +x search-mcp
# Run with stdio (for MCP clients like Claude Desktop, Cursor)
@@ -200,7 +200,7 @@ First search is slow (container startup). If consistently slow:
```bash
# Clone repo
git clone https://github.com/yourusername/search-mcp
git clone https://github.com/karti-ai/search-mcp
cd search-mcp
# Build
@@ -243,7 +243,7 @@ make build-all
## License
MIT
Apache 2.0
---
+34
View File
@@ -0,0 +1,34 @@
package main
import (
"testing"
)
func TestToolNames(t *testing.T) {
tools := getAllTools()
expectedTools := []string{
"searxng_search",
"searxng_image_search",
"searxng_news_search",
"grep_search",
"github_file",
"github_batch_files",
"search_status",
"searxng_start",
"searxng_stop",
"searxng_config",
"searxng_engines_info",
}
if len(tools) != len(expectedTools) {
t.Errorf("Expected %d tools, got %d", len(expectedTools), len(tools))
}
}
func TestSearXNGConfig(t *testing.T) {
config := getDefaultSearXNGConfig()
if config == "" {
t.Error("Default SearXNG config should not be empty")
}
}