Skip to content

feat: Production-grade agent with observability and security #175

feat: Production-grade agent with observability and security

feat: Production-grade agent with observability and security #175

Workflow file for this run

name: CI
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Test TypeScript projects
typescript:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "18"
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9.0.0
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Lint
run: pnpm lint
- name: Type check
run: pnpm check-types
- name: Test
run: pnpm test
- name: Generate Prisma Client
run: pnpm --filter=web db:generate
- name: Build
run: pnpm build
env:
DATABASE_URL: "postgresql://dummy:dummy@localhost:5432/dummy"
AUTH_SECRET: "dummy-secret-for-build"
NEXTAUTH_URL: "http://localhost:3000"
# Test Go project
go:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./apps/agent
steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: "1.24"
- name: Install tools
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
go install golang.org/x/tools/cmd/goimports@latest
- name: Lint
run: |
go vet ./...
staticcheck ./...
- name: Format check
run: |
if [ -n "$(gofmt -s -l .)" ]; then
echo "Go code is not properly formatted"
gofmt -s -d .
exit 1
fi
if [ -n "$(goimports -l .)" ]; then
echo "Go imports are not properly formatted"
goimports -d .
exit 1
fi
- name: Test
run: go test -v -race ./...
- name: Build
run: go build -o bin/agent .
# Security scanning
security:
runs-on: ubuntu-latest
permissions:
security-events: write
steps:
- uses: actions/checkout@v4
- name: Run Trivy scanner
uses: aquasecurity/trivy-action@master
with:
scan-type: "fs"
scan-ref: "."
format: "sarif"
output: "trivy-results.sarif"
- name: Upload scan results
uses: github/codeql-action/upload-sarif@v3
if: always()
with:
sarif_file: "trivy-results.sarif"