To gitea and beyond, let's go(-yco)

This commit is contained in:
2025-11-10 19:12:09 +01:00
parent 8f6133392d
commit 71a031342b
245 changed files with 83994 additions and 0 deletions

24
scripts/test-coverage.sh Executable file
View File

@@ -0,0 +1,24 @@
#!/bin/bash
set -e
COVERAGE_DIR="coverage"
PACKAGE="${1:-./internal/e2e/...}"
mkdir -p "$COVERAGE_DIR"
echo "Running tests with coverage for: $PACKAGE"
go test -v -coverprofile="$COVERAGE_DIR/coverage.out" -covermode=atomic "$PACKAGE"
echo "Generating HTML coverage report..."
go tool cover -html="$COVERAGE_DIR/coverage.out" -o "$COVERAGE_DIR/coverage.html"
echo "Generating coverage summary..."
go tool cover -func="$COVERAGE_DIR/coverage.out" | tee "$COVERAGE_DIR/coverage.txt"
echo ""
echo "Coverage report generated:"
echo " HTML: $COVERAGE_DIR/coverage.html"
echo " Text: $COVERAGE_DIR/coverage.txt"
echo " Raw: $COVERAGE_DIR/coverage.out"