-
Notifications
You must be signed in to change notification settings - Fork 31
57 lines (49 loc) · 1.37 KB
/
pull-request.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Test
on:
pull_request:
branches: dev
jobs:
test:
strategy:
matrix:
os: [ubuntu-20.04, macos-12, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Get sources
uses: actions/checkout@v3
- name: Set up Go 1.20
uses: actions/setup-go@v3
with:
go-version: '1.20'
- name: Run go mod tidy
run: go mod tidy
- name: Run golangci-lint
run: |
go install github.com/golangci/golangci-lint/cmd/golangci-lint@251ceaa228607dd3e0371694a1ab2c45d21cb744
golangci-lint run --timeout=500s
- name: Run tests
run: go test -timeout 15m -v ./...
- name: Run tests with race check
if: runner.os != 'Windows'
run: go test -race -v ./tests
Fuzzing:
runs-on: ubuntu-latest
steps:
- name: Build Fuzzers
id: build
uses: google/oss-fuzz/infra/cifuzz/actions/build_fuzzers@master
with:
oss-fuzz-project-name: 'gluon'
language: go
- name: Run Fuzzers
uses: google/oss-fuzz/infra/cifuzz/actions/run_fuzzers@master
with:
oss-fuzz-project-name: 'gluon'
language: go
fuzz-seconds: 300
- name: Upload Crash
uses: actions/upload-artifact@v3
if: failure() && steps.build.outcome == 'success'
with:
name: artifacts
path: ./out/artifacts