diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..65d43fd --- /dev/null +++ b/.github/workflows/ci.yml @@ -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 }} diff --git a/README.md b/README.md index 8d88268..67f396d 100644 --- a/README.md +++ b/README.md @@ -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 --- diff --git a/main_test.go b/main_test.go new file mode 100644 index 0000000..138e1cc --- /dev/null +++ b/main_test.go @@ -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") + } +}