fix incremental logic

This commit is contained in:
jay brown
2025-07-22 11:42:47 -07:00
parent a9d81a1094
commit 00a46eb629
+7 -11
View File
@@ -55,24 +55,19 @@ tasks:
TEST_TARGETS=""
NEED_COVERAGE_MERGE=false
# Check if we should run full tests
# INCREMENTAL=false takes absolute precedence - force full test mode
if [ "{{.INCREMENTAL}}" = "false" ]; then
echo "Running full test suite (INCREMENTAL=false)..."
TEST_MODE="full"
fi
if [ "{{.INCREMENTAL}}" = "true" ] && [ ! -f "{{.COVERAGE_FILE}}" ]; then
else
# Only process incremental logic if INCREMENTAL != false
if [ ! -f "{{.COVERAGE_FILE}}" ]; then
echo "No existing coverage file found, running full tests to establish baseline"
TEST_MODE="full"
fi
if [ "{{.INCREMENTAL}}" = "true" ] && [ -f "{{.COVERAGE_FILE}}" ] && ! git rev-parse origin/main >/dev/null 2>&1; then
elif ! git rev-parse origin/main >/dev/null 2>&1; then
echo "Cannot find origin/main branch, defaulting to full tests"
TEST_MODE="full"
fi
# Handle incremental mode
if [ "{{.INCREMENTAL}}" = "true" ] && [ -f "{{.COVERAGE_FILE}}" ] && git rev-parse origin/main >/dev/null 2>&1; then
elif git rev-parse origin/main >/dev/null 2>&1; then
echo "Running incremental test suite (INCREMENTAL=true)..."
echo "Checking for Go files changed since origin/main..."
@@ -98,6 +93,7 @@ tasks:
fi
fi
fi
fi
# Set targets for full tests
if [ "$TEST_MODE" = "full" ]; then