Skip to content

Reduce cyclomatic complexity of production functions for Awesome Go c… #10

Reduce cyclomatic complexity of production functions for Awesome Go c…

Reduce cyclomatic complexity of production functions for Awesome Go c… #10

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.24']
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- run: go test -race -coverprofile=coverage.out ./...
- run: |
COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | tr -d '%')
echo "Coverage: ${COVERAGE}%"
if (( $(echo "$COVERAGE < 95" | bc -l) )); then
echo "Coverage ${COVERAGE}% is below 95% threshold"
exit 1
fi
- run: go vet ./...
bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.24'
- run: go test -run=^$ -bench=. -benchmem ./...