Skip to content

feat: MCP request_key tool and agent identity headers (Stories 2.2 + … #228

feat: MCP request_key tool and agent identity headers (Stories 2.2 + …

feat: MCP request_key tool and agent identity headers (Stories 2.2 + … #228

Workflow file for this run

name: CI
on:
push:
branches: [main, "feat/**", "fix/**", "docs/**"]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: .go-version
cache: true
- name: Download dependencies
run: go mod download
- name: Vet
run: go vet ./...
- name: Test
run: go test ./... -coverprofile=coverage.out -race
env:
BIFROST_MODE: test
- name: Coverage report
run: go tool cover -func=coverage.out
- name: Upload coverage
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.out
build:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: .go-version
cache: true
- name: Build binary
run: make build
swagger-check:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: .go-version
cache: true
- name: Install swag
run: go install github.com/swaggo/swag/cmd/swag@latest
- name: Regenerate spec
run: swag init -g docs.go --parseDependency --parseInternal -o docs/swagger
- name: Check for drift
run: |
if ! git diff --exit-code docs/swagger/; then
echo ""
echo "❌ OpenAPI spec is out of sync with handler annotations."
echo " Run 'make swagger' locally and commit the result."
git diff docs/swagger/
exit 1
fi
echo "✅ OpenAPI spec is up to date."
integration-check:
runs-on: ubuntu-latest
needs: build
services:
redis:
image: redis:7-alpine
ports:
- 6379:6379
postgres:
image: postgres:16-alpine
env:
POSTGRES_USER: bifrost
POSTGRES_PASSWORD: bifrost
POSTGRES_DB: bifrost
ports:
- 5432:5432
options: >-
--health-cmd="pg_isready -U bifrost"
--health-interval=5s
--health-timeout=5s
--health-retries=5
--health-start-period=5s
steps:
- uses: actions/checkout@v4
- name: Build Docker image
run: docker build -t bifrost:test .
- name: Run bifrost check
run: |
docker run --rm \
--network host \
-e REDIS_ADDR=localhost:${{ job.services.redis.ports['6379'] }} \
-e DATABASE_DSN=postgres://bifrost:bifrost@localhost:${{ job.services.postgres.ports['5432'] }}/bifrost?sslmode=disable \
bifrost:test /app/bifrost-cli check