File tree Expand file tree Collapse file tree 2 files changed +61
-2
lines changed Expand file tree Collapse file tree 2 files changed +61
-2
lines changed Original file line number Diff line number Diff line change
1
+ ---
1
2
name : CI
2
3
3
4
on : [push, pull_request]
6
7
test :
7
8
name : Go ${{ matrix.go-version }} with Kafka ${{ matrix.kafka-version }} on Ubuntu
8
9
runs-on : ubuntu-latest
10
+ # We want to run on external PRs, but not on our own internal PRs as they'll be run
11
+ # by the push to the branch.
12
+ if : github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
9
13
strategy :
10
14
fail-fast : false
11
15
matrix :
15
19
16
20
env :
17
21
DEBUG : true
22
+ GOFLAGS : -trimpath
18
23
KAFKA_VERSION : ${{ matrix.kafka-version }}
19
24
20
25
steps :
25
30
with :
26
31
go-version : ${{ matrix.go-version }}
27
32
28
- - uses : actions/cache@v2
33
+ - name : Get Go environment
34
+ id : go-env
35
+ run : |
36
+ echo "::set-output name=cache::$(go env GOCACHE)"
37
+ echo "::set-output name=modcache::$(go env GOMODCACHE)"
38
+
39
+ - name : Set up cache
40
+ uses : actions/cache@v2
29
41
with :
30
- path : ~/go/pkg/mod
42
+ path : |
43
+ ${{ steps.go-env.outputs.cache }}
44
+ ${{ steps.go-env.outputs.modcache }}
31
45
key : ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
32
46
restore-keys : |
33
47
${{ runner.os }}-go-
Original file line number Diff line number Diff line change
1
+ ---
2
+ name : Fuzzing
3
+
4
+ on : [push, pull_request]
5
+
6
+ jobs :
7
+ test :
8
+ name : Fuzz
9
+ runs-on : ubuntu-latest
10
+ # We want to run on external PRs, but not on our own internal PRs as they'll be run
11
+ # by the push to the branch.
12
+ if : github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
13
+
14
+ env :
15
+ GOFLAGS : -trimpath
16
+
17
+ steps :
18
+ - uses : actions/checkout@v2
19
+
20
+ - name : Setup Go
21
+ uses : actions/setup-go@v2
22
+ with :
23
+ go-version : 1.17.x
24
+
25
+ - name : Get Go environment
26
+ id : go-env
27
+ run : |
28
+ echo "::set-output name=cache::$(go env GOCACHE)"
29
+ echo "::set-output name=modcache::$(go env GOMODCACHE)"
30
+
31
+ - name : Set up cache
32
+ uses : actions/cache@v2
33
+ with :
34
+ path : |
35
+ ${{ steps.go-env.outputs.cache }}
36
+ ${{ steps.go-env.outputs.modcache }}
37
+ key : fuzz-go-${{ hashFiles('**/go.sum') }}
38
+ restore-keys : |
39
+ fuzz-go-
40
+
41
+ - name : Build Go tip
42
+ run : go install golang.org/dl/gotip@latest && gotip download
43
+
44
+ - name : Run any fuzzing tests
45
+ run : gotip test -v -run=^Fuzz -test.fuzztime=5m ./...
You can’t perform that action at this time.
0 commit comments