Skip to content

Commit 6de0973

Browse files
committed
sync: update 4 files from source repository
1 parent 2444736 commit 6de0973

4 files changed

Lines changed: 9 additions & 5 deletions

File tree

.github/.env.base

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ NANCY_EXCLUDES=CVE-2024-38513,CVE-2023-45142
260260
# ================================================================================================
261261

262262
# Pre-Commit System
263-
GO_PRE_COMMIT_VERSION=v1.1.15 # https://github.com/mrz1836/go-pre-commit
263+
GO_PRE_COMMIT_VERSION=v1.1.16 # https://github.com/mrz1836/go-pre-commit
264264
GO_PRE_COMMIT_USE_LOCAL=false # Use local version for development
265265

266266
# System Settings

.github/actions/test-failure-detection/action.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,24 +119,27 @@ runs:
119119
# Initialize JSON array for structured failures with signatures
120120
echo '[]' > "$signatures_file"
121121
122+
# Define common test validation filter to avoid duplication
123+
local test_failure_filter='select(.Action == "fail" and .Test != null and .Test != "" and .Test != "null" and (.Test | test("^Test[A-Za-z]")))'
124+
122125
# Fast single-pass JSON extraction for test failures (< 1s for 10K lines)
123126
# Filter JSON lines and parse in one pass - eliminates 2-minute hang
124127
# Note: Line numbers aren't available in Go test JSON output
125128
# IMPORTANT: Only detect actual test function failures, not package/suite completion events
126129
grep '^{' "$json_file" 2>/dev/null | \
127-
jq -r 'select(.Action == "fail" and .Test != null and .Test != "" and .Test != "null" and (.Test | test("^Test[A-Za-z]"))) |
130+
jq -r "$test_failure_filter"' |
128131
"--- FAIL: \(.Test) (\(.Package))"' \
129132
2>/dev/null > "$failures_file"
130133
131134
# Create structured test failure entries with unique signatures
132-
if grep '^{' "$json_file" 2>/dev/null | jq -r 'select(.Action == "fail" and .Test != null and .Test != "" and .Test != "null" and (.Test | test("^Test[A-Za-z]")))' 2>/dev/null | head -1 | grep -q .; then
135+
if grep '^{' "$json_file" 2>/dev/null | jq -r "$test_failure_filter" 2>/dev/null | head -1 | grep -q .; then
133136
echo "📝 Creating structured test failure entries with enhanced output..."
134137
135138
# First pass: Extract test failure basic info from Action == "fail" entries
136139
local temp_failures
137140
temp_failures=$(mktemp)
138141
grep '^{' "$json_file" 2>/dev/null | \
139-
jq -r 'select(.Action == "fail" and .Test != null and .Test != "" and .Test != "null" and (.Test | test("^Test[A-Za-z]"))) | {
142+
jq -r "$test_failure_filter"' | {
140143
type: "test",
141144
package: .Package,
142145
test: (if (.Test and .Test != null and .Test != "null") then .Test else "unknown" end),

.github/workflows/fortress-release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ jobs:
269269
id: goreleaser
270270
env:
271271
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
272+
SKIP_GORELEASER_TESTS: "true"
272273
run: |
273274
echo "🚀 Building and publishing release with GoReleaser..."
274275

.github/workflows/fortress-test-matrix.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ jobs:
264264
# Count ONLY failed test events, not package/suite failures which are expected
265265
# Look for Action="fail" AND Package field AND Test field (indicating actual test failure)
266266
JSON_FAILURES=$(grep '^{' test-output.log 2>/dev/null | \
267-
jq -r 'select(.Action == "fail" and .Test != null and .Test != "" and (.Package // "") != "" and (.Test | test("^Test[A-Z]"))) | .Test' 2>/dev/null | wc -l | xargs || echo "0")
267+
jq -r 'select(.Action == "fail" and .Test != null and .Test != "" and (.Package // "") != "" and (.Test | test("^Test[A-Za-z]"))) | .Test' 2>/dev/null | wc -l | xargs || echo "0")
268268
269269
if [[ $JSON_FAILURES -gt 0 ]]; then
270270
echo "⚠️ Found $JSON_FAILURES actual failing test functions in JSON output"

0 commit comments

Comments
 (0)