-
-
Notifications
You must be signed in to change notification settings - Fork 44
42 lines (35 loc) · 1.05 KB
/
main.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: main
on: [push, pull_request]
jobs:
test:
name: Build on ${{ matrix.os }} with Go ${{ matrix.go }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
go: ['1.19']
steps:
- name: Set up Go ${{ matrix.go }}
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: Download dependencies
run: go mod download
- name: Cache modules
uses: actions/cache@v3
with:
path: ~/go/pkg/mod
key: ${{ runner.OS }}-go-${{ hashFiles('**/go.sum') }}
- name: Build
run: go build
- name: Test
run: go test -coverpkg ./... -covermode atomic -coverprofile coverage.txt -tags fuzz -numCases 3000 -numEvents 10 ./...
- name: Lint
run: go vet ./...
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.txt