Debian Codegraph @

.github/workflows/go.yaml

raw symbols SCIP
1 name: Go
2
3 on: [push, pull_request]
4
5 jobs:
6
7 test:
8 name: Build
9 runs-on: ${{ matrix.os }}
10 defaults:
11 run:
12 shell: bash
13
14 strategy:
15 matrix:
16 os: [ubuntu-latest, macos-latest, windows-latest]
17 go: ['1.13.x', '1.x']
18 include:
19 - os: ubuntu-latest
20 fuzzing: true
21 fail-fast: false
22 env:
23 OS: ${{ matrix.os }}
24 GO: ${{ matrix.go }}
25 steps:
26 - if: startsWith(matrix.os, 'macos')
27 run: brew update
28
29 - uses: actions/setup-go@v2
30 with:
31 go-version: ${{ matrix.go }}
32
33 - name: Add $GOPATH/bin to $PATH
34 run: |
35 echo "$(go env GOPATH)/bin" >> "$GITHUB_PATH"
36
37 - uses: actions/checkout@v2
38
39 - name: Build
40 run: go build
41
42 - name: Test
43 run: go test
44
45 - name: Get Fuzzing Tools
46 if: matrix.fuzzing
47 run: |
48 go get github.com/dvyukov/go-fuzz/go-fuzz github.com/dvyukov/go-fuzz/go-fuzz-build
49
50 - name: Test Fuzzing
51 if: matrix.fuzzing
52 run: |
53 go-fuzz-build -o=./fuzz.zip
54 # Fuzzing 30 seconds
55 bash -c '(timeout 30 go-fuzz -bin=./fuzz.zip -workdir=./workdir; ret=$?; echo timeout ret=$ret; (( ret == 124 )) && ret=0; exit $ret)'