Skip to content

feat: performance benchmark suite + profile findings #36

feat: performance benchmark suite + profile findings

feat: performance benchmark suite + profile findings #36

Workflow file for this run

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-file: go.mod
- name: Vet
run: go vet ./...
- name: Test
run: go test -race -coverprofile=coverage.out -covermode=atomic ./pkg/...
- name: Coverage gate
run: |
COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | tr -d '%')
echo "Coverage: ${COVERAGE}%"
if [ "$(echo "${COVERAGE} < 77" | bc -l)" -eq 1 ]; then
echo "Coverage ${COVERAGE}% is below 77% threshold"
exit 1
fi
- name: Upload coverage
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage
path: coverage.out