Skip to content

Commit 00cd697

Browse files
authored
Merge pull request #321 from mrueg/github-actions
Move to Github Actions / Golangci-Lint
2 parents fd5535f + ff70d21 commit 00cd697

File tree

4 files changed

+21
-32
lines changed

4 files changed

+21
-32
lines changed

.github/workflows/tests.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
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

.travis.yml

-18
This file was deleted.

Makefile

+3-12
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,8 @@ race:
1010
fmt:
1111
!(gofmt -l -s -d $(shell find . -name \*.go) | grep '[a-z]')
1212

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 ./...
2415

2516
test:
2617
TEST_FREELIST_TYPE=hashmap go test -timeout 20m -v -coverprofile cover.out -covermode atomic
@@ -33,4 +24,4 @@ test:
3324
# Note: gets "program not an importable package" in out of path builds
3425
@TEST_FREELIST_TYPE=array go test -v ./cmd/bbolt
3526

36-
.PHONY: race fmt errcheck test gosimple unused
27+
.PHONY: race fmt test lint

db_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,15 +30,15 @@ const pageHeaderSize = 16
3030

3131
// meta represents a simplified version of a database meta page for testing.
3232
type meta struct {
33-
magic uint32
33+
_ uint32
3434
version uint32
3535
_ uint32
3636
_ uint32
3737
_ [16]byte
3838
_ uint64
3939
pgid uint64
4040
_ uint64
41-
checksum uint64
41+
_ uint64
4242
}
4343

4444
// Ensure that a database can be opened without error.

0 commit comments

Comments
 (0)