Skip to content

Commit 52e1361

Browse files
committed
Add gh action for checks and tests
1 parent 59c1b71 commit 52e1361

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

.github/workflows/go.yml

+6-9
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
11
name: Go
22

33
on:
4-
push:
5-
branches: [ main ]
6-
pull_request:
7-
branches: [ main ]
4+
[push]
85

96
jobs:
107

11-
build:
8+
test:
129
runs-on: ubuntu-latest
1310
steps:
1411
- uses: actions/checkout@v3
@@ -18,11 +15,11 @@ jobs:
1815
with:
1916
go-version: 1.21
2017

21-
- name: Build
22-
run: go build -v ./...
23-
2418
- name: Test
25-
run: go test ./...
19+
run: make test
20+
21+
- name: Checks
22+
run: make checks
2623

2724
- name: Benchmark
2825
run: go test -v -run=XXX -benchmem -bench=. ./...

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ benchmark:
1818

1919
checks:
2020
go vet ${PKGS}
21-
staticcheck ${PKGS}
21+
go run honnef.co/go/tools/cmd/staticcheck@latest ${PKGS}
2222
make lint
2323

2424
lint:
25-
go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run -c .golangci.yml -v
25+
go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run -c .golangci.yml
2626

2727
drone:
2828
drone lint .drone.yml --trusted

0 commit comments

Comments
 (0)