github: upload crash artifacts from go test -fuzz

Update the Fuzzing workflow to upload crash artifacts found during the
go_test_fuzz job. Currently, when `go test -fuzz` fails, the crash
reproducers are generated but not preserved, making it difficult to
diagnose and fix the issues discovered in CI.

This change adds an upload-artifact step that captures all files in
testdata/fuzz directories across the repository upon failure.

Assisted-by: gemini-cli
Signed-off-by: Samuel Karp <samuelkarp@google.com>
Signed-off-by: lauralorenz <lauralorenz@google.com>
This commit is contained in:
Samuel Karp
2026-02-25 13:14:21 -08:00
committed by lauralorenz
parent 0651e66e16
commit 0ffe456f1e

View File

@@ -43,3 +43,10 @@ jobs:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- uses: ./.github/actions/install-go
- run: script/go-test-fuzz.sh
- name: Upload Crash
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
if: failure()
with:
name: go-test-fuzz-artifacts
path: "**/testdata/fuzz/**"
if-no-files-found: ignore