Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,48 @@ jobs:
- run: make proto-fmt
- run: make check-protos check-api-descriptors

#
# Unit tests
#
tests:
name: Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 10

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: '.github/.tool-versions'
- name: Run unit tests
run: go test -race -count=1 $(go list ./... | grep -v /integration)

#
# Fuzz tests
#
fuzz:
name: Fuzz Tests
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: '.github/.tool-versions'
- name: Run all fuzz tests
run: |
# Find all packages containing fuzz tests and run each target.
# go test -fuzz only accepts one package at a time and one
# matching fuzz target, so we discover and iterate.
grep -r --include='*_test.go' -l '^func Fuzz' . | while read -r file; do
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

grep -r ... . will recursively scan everything in the checkout (including .git/ and any vendored/generated directories), which can be slow and may produce false positives. Prefer restricting discovery to tracked Go test files (e.g., via git ls-files '*_test.go') and/or explicitly excluding .git, vendor, and _output from the search.

Suggested change
grep -r --include='*_test.go' -l '^func Fuzz' . | while read -r file; do
git ls-files '*_test.go' | while read -r file; do
grep -q '^func Fuzz' "$file" || continue

Copilot uses AI. Check for mistakes.
pkg=$(dirname "$file")
grep -o '^func Fuzz[A-Za-z0-9_]*' "$file" | sed 's/^func //' | while read -r target; do
echo "=== Fuzzing ${target} in ${pkg} ==="
go test "${pkg}" -fuzz="^${target}$" -fuzztime=60s
done
done
Comment on lines +145 to +151
Copy link

Copilot AI Apr 13, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fuzz step will fail the job when no fuzz targets exist. In GitHub Actions’ default bash settings (errexit + pipefail), grep -r ... -l '^func Fuzz' exits 1 when it finds no matches, which currently happens in this repo (no func Fuzz... found). Make this step a no-op when there are no fuzz tests (e.g., capture matches and exit 0 when empty) or add the fuzz tests in the same PR.

Copilot uses AI. Check for mistakes.

#
# Build kernels on cache miss
#
Expand Down
Loading