fix: rewrite agent prompts — concise steps, correct heartbeat docs #142
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] | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.26" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Build frontend | |
| run: | | |
| cd web/app | |
| npm ci | |
| npm run build | |
| - name: Install dependencies | |
| run: sudo apt-get update && sudo apt-get install -y gcc libsqlite3-dev | |
| - name: Download modules | |
| run: go mod download | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Test | |
| run: CGO_ENABLED=1 go test -race -coverprofile=coverage.out ./... | |
| - name: Check coverage | |
| run: | | |
| COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print substr($3, 1, length($3)-1)}') | |
| THRESHOLD=25 | |
| echo "Coverage: ${COVERAGE}% (threshold: ${THRESHOLD}%)" | |
| if [ "$(echo "$COVERAGE < $THRESHOLD" | bc -l)" -eq 1 ]; then | |
| echo "::error::Coverage ${COVERAGE}% is below threshold ${THRESHOLD}%" | |
| exit 1 | |
| fi | |
| - name: Build | |
| run: CGO_ENABLED=1 go build -v ./cmd/peerclawd | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.26" | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| - name: Build frontend | |
| run: | | |
| cd web/app | |
| npm ci | |
| npm run build | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: v2.11.1 |