File tree 4 files changed +21
-32
lines changed
4 files changed +21
-32
lines changed Original file line number Diff line number Diff line change
1
+ name : Tests
2
+ on : [push, pull_request]
3
+ jobs :
4
+ test :
5
+ runs-on : ubuntu-latest
6
+ steps :
7
+ - uses : actions/checkout@v2
8
+ - uses : actions/setup-go@v2
9
+ with :
10
+ go-version : " 1.17.8"
11
+ - run : make fmt
12
+ - run : make race
13
+ - run : make test
14
+ # Enable when fixed (same as make lint)
15
+ # - name: golangci-lint
16
+ # uses: golangci/golangci-lint-action@v2
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 10
10
fmt :
11
11
! (gofmt -l -s -d $( shell find . -name \* .go) | grep ' [a-z]' )
12
12
13
- # go get honnef.co/go/tools/simple
14
- gosimple :
15
- gosimple ./...
16
-
17
- # go get honnef.co/go/tools/unused
18
- unused :
19
- unused ./...
20
-
21
- # go get github.com/kisielk/errcheck
22
- errcheck :
23
- @errcheck -ignorepkg=bytes -ignore=os:Remove go.etcd.io/bbolt
13
+ lint :
14
+ golangci-lint run ./...
24
15
25
16
test :
26
17
TEST_FREELIST_TYPE=hashmap go test -timeout 20m -v -coverprofile cover.out -covermode atomic
33
24
# Note: gets "program not an importable package" in out of path builds
34
25
@TEST_FREELIST_TYPE=array go test -v ./cmd/bbolt
35
26
36
- .PHONY : race fmt errcheck test gosimple unused
27
+ .PHONY : race fmt test lint
Original file line number Diff line number Diff line change @@ -30,15 +30,15 @@ const pageHeaderSize = 16
30
30
31
31
// meta represents a simplified version of a database meta page for testing.
32
32
type meta struct {
33
- magic uint32
33
+ _ uint32
34
34
version uint32
35
35
_ uint32
36
36
_ uint32
37
37
_ [16 ]byte
38
38
_ uint64
39
39
pgid uint64
40
40
_ uint64
41
- checksum uint64
41
+ _ uint64
42
42
}
43
43
44
44
// Ensure that a database can be opened without error.
You can’t perform that action at this time.
0 commit comments