fix: Update CI workflow and close stale issues
**CI Improvements:** - Fix Go version: 1.25 → 1.23 (matches go.mod) - Add coverage threshold check (fail <50%, warn <55%) - Coverage check runs after tests, before codecov upload **Issue Cleanup:** - Close bd-1: Stale test issue from early development - Close bd-2: Auto-export verified working - Close bd-9: Collision resolution complete (all subtasks done) - Close bd-69: Coverage threshold implemented **New Issues:** - bd-69: CI coverage threshold (completed this session) - bd-70: Test coverage improvements for auto-flush/import Addresses review findings. System is now clean and ready for plugin testing (bd-64). 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
File diff suppressed because one or more lines are too long
17
.github/workflows/ci.yml
vendored
17
.github/workflows/ci.yml
vendored
@@ -16,7 +16,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.25'
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Build
|
||||
run: go build -v ./cmd/bd
|
||||
@@ -24,6 +24,19 @@ jobs:
|
||||
- name: Test
|
||||
run: go test -v -race -coverprofile=coverage.out ./...
|
||||
|
||||
- name: Check coverage threshold
|
||||
run: |
|
||||
COVERAGE=$(go tool cover -func=coverage.out | grep total | awk '{print $3}' | sed 's/%//')
|
||||
echo "Coverage: $COVERAGE%"
|
||||
if (( $(echo "$COVERAGE < 50" | bc -l) )); then
|
||||
echo "❌ Coverage is below 50% threshold"
|
||||
exit 1
|
||||
elif (( $(echo "$COVERAGE < 55" | bc -l) )); then
|
||||
echo "⚠️ Coverage is below 55% (warning threshold)"
|
||||
else
|
||||
echo "✅ Coverage meets threshold"
|
||||
fi
|
||||
|
||||
- name: Upload coverage
|
||||
uses: codecov/codecov-action@v4
|
||||
if: success()
|
||||
@@ -40,7 +53,7 @@ jobs:
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.25'
|
||||
go-version: '1.23'
|
||||
|
||||
- name: golangci-lint
|
||||
uses: golangci/golangci-lint-action@v6
|
||||
|
||||
Reference in New Issue
Block a user