![]() |
Reusable workflow for running Go fuzz tests. Executes a configurable fuzz command and uploads failure artifacts for analysis.
| Input | Description | Required | Default |
|---|---|---|---|
runner_type |
GitHub runner type to use | No | blacksmith-4vcpu-ubuntu-2404 |
go_version |
Go version to use | No | 1.25 |
fuzz_command |
Command to run fuzz tests | No | make fuzz-ci |
fuzz_artifacts_path |
Path pattern for fuzz failure artifacts | No | tests/fuzz/**/testdata/fuzz/ |
artifacts_retention_days |
Number of days to retain fuzz failure artifacts | No | 7 |
timeout_minutes |
Maximum job duration in minutes (safety net for unbounded fuzz) | No | 30 |
dry_run |
Preview configuration without running fuzz tests | No | false |
name: Fuzz Tests
on:
schedule:
- cron: '0 0 * * 0'
workflow_dispatch:
permissions:
contents: read
jobs:
fuzz:
uses: LerianStudio/github-actions-shared-workflows/.github/workflows/go-fuzz.yml@v1.12.0
with:
go_version: '1.25'jobs:
fuzz:
uses: LerianStudio/github-actions-shared-workflows/.github/workflows/go-fuzz.yml@develop
with:
go_version: '1.25'
dry_run: truejobs:
fuzz:
uses: LerianStudio/github-actions-shared-workflows/.github/workflows/go-fuzz.yml@v1.12.0
with:
go_version: '1.25'
fuzz_command: 'go test -fuzz=. -fuzztime=30s ./...'
fuzz_artifacts_path: '**/testdata/fuzz/'The default fuzz_command is make fuzz-ci. Caller repositories must either:
- Have a
fuzz-citarget in theirMakefile(recommended — allows configuring-fuzztimeper repo) - Override
fuzz_commandwith a direct Go command, e.g.:fuzz_command: 'go test -fuzz=. -fuzztime=60s ./...'
The timeout_minutes input (default: 30) acts as a safety net to prevent unbounded fuzz runs. Ensure your fuzz command uses -fuzztime to control individual test duration.
permissions:
contents: read