fix: route peer-to-peer sends via Router instead of Connection Core #79
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| jobs: | |
| vet: | |
| name: Go Vet | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: agentanycast/agentanycast | |
| path: agentanycast-main | |
| sparse-checkout: proto | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: AgentAnycast/agentanycast-identity | |
| path: agentanycast-identity | |
| - uses: bufbuild/buf-setup-action@v1 | |
| with: | |
| github_token: ${{ github.token }} | |
| - name: Generate Go code from proto | |
| working-directory: agentanycast-main/proto | |
| run: | | |
| printf 'version: v2\nplugins:\n - remote: buf.build/protocolbuffers/go\n out: gen/go\n opt: paths=source_relative\n - remote: buf.build/grpc/go\n out: gen/go\n opt: paths=source_relative\n' > buf.gen.go-only.yaml | |
| buf generate --template buf.gen.go-only.yaml | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Configure local replace directives | |
| run: | | |
| go mod edit -replace github.com/agentanycast/agentanycast-proto=./agentanycast-main/proto | |
| go mod edit -replace github.com/AgentAnycast/agentanycast-identity=./agentanycast-identity | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Go vet | |
| run: go vet ./... | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: agentanycast/agentanycast | |
| path: agentanycast-main | |
| sparse-checkout: proto | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: AgentAnycast/agentanycast-identity | |
| path: agentanycast-identity | |
| - uses: bufbuild/buf-setup-action@v1 | |
| with: | |
| github_token: ${{ github.token }} | |
| - name: Generate Go code from proto | |
| working-directory: agentanycast-main/proto | |
| run: | | |
| printf 'version: v2\nplugins:\n - remote: buf.build/protocolbuffers/go\n out: gen/go\n opt: paths=source_relative\n - remote: buf.build/grpc/go\n out: gen/go\n opt: paths=source_relative\n' > buf.gen.go-only.yaml | |
| buf generate --template buf.gen.go-only.yaml | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Configure local replace directives | |
| run: | | |
| go mod edit -replace github.com/agentanycast/agentanycast-proto=./agentanycast-main/proto | |
| go mod edit -replace github.com/AgentAnycast/agentanycast-identity=./agentanycast-identity | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v6 | |
| with: | |
| version: v2.1.6 | |
| test: | |
| name: Go Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: agentanycast/agentanycast | |
| path: agentanycast-main | |
| sparse-checkout: proto | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: AgentAnycast/agentanycast-identity | |
| path: agentanycast-identity | |
| - uses: bufbuild/buf-setup-action@v1 | |
| with: | |
| github_token: ${{ github.token }} | |
| - name: Generate Go code from proto | |
| working-directory: agentanycast-main/proto | |
| run: | | |
| printf 'version: v2\nplugins:\n - remote: buf.build/protocolbuffers/go\n out: gen/go\n opt: paths=source_relative\n - remote: buf.build/grpc/go\n out: gen/go\n opt: paths=source_relative\n' > buf.gen.go-only.yaml | |
| buf generate --template buf.gen.go-only.yaml | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Configure local replace directives | |
| run: | | |
| go mod edit -replace github.com/agentanycast/agentanycast-proto=./agentanycast-main/proto | |
| go mod edit -replace github.com/AgentAnycast/agentanycast-identity=./agentanycast-identity | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run unit tests | |
| run: go test -short -race -count=1 -coverprofile=coverage.out ./... | |
| - name: Upload coverage | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| fail_ci_if_error: false | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: agentanycast/agentanycast | |
| path: agentanycast-main | |
| sparse-checkout: proto | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: AgentAnycast/agentanycast-identity | |
| path: agentanycast-identity | |
| - uses: bufbuild/buf-setup-action@v1 | |
| with: | |
| github_token: ${{ github.token }} | |
| - name: Generate Go code from proto | |
| working-directory: agentanycast-main/proto | |
| run: | | |
| printf 'version: v2\nplugins:\n - remote: buf.build/protocolbuffers/go\n out: gen/go\n opt: paths=source_relative\n - remote: buf.build/grpc/go\n out: gen/go\n opt: paths=source_relative\n' > buf.gen.go-only.yaml | |
| buf generate --template buf.gen.go-only.yaml | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Configure local replace directives | |
| run: | | |
| go mod edit -replace github.com/agentanycast/agentanycast-proto=./agentanycast-main/proto | |
| go mod edit -replace github.com/AgentAnycast/agentanycast-identity=./agentanycast-identity | |
| - name: Install govulncheck | |
| run: go install golang.org/x/vuln/cmd/govulncheck@latest | |
| - name: Run govulncheck | |
| run: govulncheck ./... | |
| continue-on-error: true | |
| build: | |
| name: Build Binary (linux-amd64) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: agentanycast/agentanycast | |
| path: agentanycast-main | |
| sparse-checkout: proto | |
| - uses: actions/checkout@v4 | |
| with: | |
| repository: AgentAnycast/agentanycast-identity | |
| path: agentanycast-identity | |
| - uses: bufbuild/buf-setup-action@v1 | |
| with: | |
| github_token: ${{ github.token }} | |
| - name: Generate Go code from proto | |
| working-directory: agentanycast-main/proto | |
| run: | | |
| printf 'version: v2\nplugins:\n - remote: buf.build/protocolbuffers/go\n out: gen/go\n opt: paths=source_relative\n - remote: buf.build/grpc/go\n out: gen/go\n opt: paths=source_relative\n' > buf.gen.go-only.yaml | |
| buf generate --template buf.gen.go-only.yaml | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Configure local replace directives | |
| run: | | |
| go mod edit -replace github.com/agentanycast/agentanycast-proto=./agentanycast-main/proto | |
| go mod edit -replace github.com/AgentAnycast/agentanycast-identity=./agentanycast-identity | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Build binary | |
| env: | |
| CGO_ENABLED: "0" | |
| GOOS: linux | |
| GOARCH: amd64 | |
| run: go build -trimpath -ldflags="-s -w" -o agentanycastd-linux-amd64 ./cmd/agentanycastd |