-
Notifications
You must be signed in to change notification settings - Fork 1.8k
42 lines (34 loc) · 1.02 KB
/
fuzz.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
name: Fuzzing
on: [push, pull_request]
jobs:
test:
name: Fuzz
runs-on: ubuntu-latest
# We want to run on external PRs, but not on our own internal PRs as they'll be run
# by the push to the branch.
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
env:
GOFLAGS: -trimpath
steps:
- uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: 1.19.x
- name: Get Go environment
id: go-env
run: |
echo "cache=$(go env GOCACHE)" >> $GITHUB_OUTPUT
echo "modcache=$(go env GOMODCACHE)" >> $GITHUB_OUTPUT
- name: Set up cache
uses: actions/cache@v3
with:
path: |
${{ steps.go-env.outputs.cache }}
${{ steps.go-env.outputs.modcache }}
key: fuzz-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
fuzz-go-
- name: Run any fuzzing tests
run: go test -v -run=^Fuzz -test.fuzztime=5m ./...