-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (47 loc) · 1.37 KB
/
ci.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
name: BitMaelum Key Resolver
on: [ push, pull_request ]
jobs:
test:
strategy:
matrix:
go-version: [ 1.13.x, 1.14.x, 1.15.x, 1.16.x ]
os: [ ubuntu-20.04 ]
runs-on: ${{ matrix.os }}
steps:
- name: Install Go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go-version }}
- name: Checkout code
uses: actions/checkout@v2
- name: Goimports
run: |
go get -u golang.org/x/tools/cmd/goimports
OUT=`goimports -l .`
echo $OUT
test -z "$OUT"
- name: Go vet
run: |
go vet ./...
- name: Go static check
run: |
go get honnef.co/go/tools/cmd/staticcheck
GOPATH=`go env GOPATH`
$GOPATH/bin/staticcheck ./...
- name: Go ineffassign
run: |
go get -u github.com/gordonklaus/ineffassign
GOPATH=`go env GOPATH`
$GOPATH/bin/ineffassign ./...
- name: Go cyclo
run: |
go get -u github.com/fzipp/gocyclo/cmd/gocyclo
GOPATH=`go env GOPATH`
$GOPATH/bin/gocyclo -over 15 .
- name: Go test
run: |
go test -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage report to coverall
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.txt