File tree 3 files changed +18
-130
lines changed
3 files changed +18
-130
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
name : Go
2
2
3
3
on :
4
- push :
5
- branches : [ main ]
6
- pull_request :
7
- branches : [ main ]
4
+ [push]
8
5
9
6
jobs :
10
7
11
- build :
8
+ test :
12
9
runs-on : ubuntu-latest
13
10
steps :
14
11
- uses : actions/checkout@v3
@@ -18,11 +15,21 @@ jobs:
18
15
with :
19
16
go-version : 1.21
20
17
21
- - name : Build
22
- run : go build -v ./...
23
-
24
18
- name : Test
25
- run : go test ./...
19
+ run : make test
26
20
27
21
- name : Benchmark
28
22
run : go test -v -run=XXX -benchmem -bench=. ./...
23
+
24
+ checks :
25
+ runs-on : ubuntu-latest
26
+ steps :
27
+ - uses : actions/checkout@v3
28
+
29
+ - name : Set up Go
30
+ uses : actions/setup-go@v3
31
+ with :
32
+ go-version : 1.21
33
+
34
+ - name : Checks
35
+ run : make checks
Original file line number Diff line number Diff line change @@ -18,15 +18,11 @@ benchmark:
18
18
19
19
checks :
20
20
go vet ${PKGS}
21
- staticcheck ${PKGS}
21
+ go run honnef.co/go/tools/cmd/ staticcheck@latest ${PKGS}
22
22
make lint
23
23
24
24
lint :
25
- go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run -c .golangci.yml -v
26
-
27
- drone :
28
- drone lint .drone.yml --trusted
29
- drone sign grafana/unused --save
25
+ go run github.com/golangci/golangci-lint/cmd/golangci-lint@latest run -c .golangci.yml
30
26
31
27
docker :
32
28
docker build --build-arg=GIT_VERSION=$(GIT_VERSION ) -t $(IMAGE_PREFIX ) /unused -f Dockerfile.exporter .
You can’t perform that action at this time.
0 commit comments