Skip to content

chore(deps): bump go-mitmproxy to v1.8.11 (#34) #117

chore(deps): bump go-mitmproxy to v1.8.11 (#34)

chore(deps): bump go-mitmproxy to v1.8.11 (#34) #117

Workflow file for this run

name: Tests
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
- run: go vet ./...
- name: Run tests with coverage
run: go test ./... -race -timeout 60s -coverprofile=coverage.out
- name: Check coverage threshold
run: |
total=$(go tool cover -func=coverage.out | grep '^total:' | awk '{print $NF}' | tr -d '%')
if [ -z "$total" ]; then
echo "Failed to parse coverage from coverage.out"
exit 1
fi
echo "Total coverage: ${total}%"
if awk "BEGIN{exit !($total < 70)}"; then
echo "Coverage ${total}% is below 70% threshold"
exit 1
fi
- name: Upload coverage report
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage-report
path: coverage.out