-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 955 Bytes
/
go.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: Go
on: [push]
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.19
uses: actions/setup-go@v3
with:
go-version: 1.19
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v1
- name: Get dependencies
run: |
go mod vendor
- name: Unit-Tests
run: |
# create the report directory
mkdir -p report/
# run the unit tests
go test -v -short -covermode=count -coverprofile report/cover.out `go list ./...`
- name: Lint
run: |
# run the linter
go vet `go list ./...`
- name: Staticcheck
run: |
# install staticcheck
go install honnef.co/go/tools/cmd/staticcheck@latest
# add the GOBIN to the path
export PATH="$PATH:$( go env GOPATH )/bin"
# run staticcheck on the source code
staticcheck `go list ./...`