File tree 4 files changed +30
-20
lines changed
4 files changed +30
-20
lines changed Original file line number Diff line number Diff line change 1
- on : [push]
1
+ on :
2
+ push :
3
+ branches :
4
+ - main
5
+ pull_request :
2
6
3
7
jobs :
4
8
build :
5
- runs-on : ubuntu-latest
9
+ runs-on : ${{ matrix.os }}
10
+ strategy :
11
+ matrix :
12
+ go-version : [ oldstable, stable ]
13
+ os : [ubuntu-latest, macos-latest, windows-latest]
6
14
steps :
7
15
- uses : actions/checkout@v4
8
16
- uses : actions/setup-go@v5
9
17
with :
10
- go-version-file : go.mod
11
- - run : make build
18
+ go-version : ${{ matrix.go-version }}
19
+ - name : Check and get dependencies
20
+ run : |
21
+ go mod download
22
+ go mod tidy
23
+ git diff --exit-code go.mod
24
+ git diff --exit-code go.sum
25
+ - run : make build
12
26
- run : make test
13
- - uses : codecov/codecov-action@v4
14
- with :
15
- token : ${{ secrets.CODECOV_TOKEN }}
16
- - uses : sarisia/actions-status-discord@v1
17
- if : always()
18
- with :
19
- webhook : ${{ secrets.DISCORD_WEBHOOK }}
20
27
21
28
lint :
22
29
runs-on : ubuntu-latest
27
34
go-version-file : go.mod
28
35
- uses : golangci/golangci-lint-action@v6
29
36
with :
30
- version : v1.60
37
+ version : v1.61
Original file line number Diff line number Diff line change
1
+ .idea /
1
2
coverage.txt
2
- cmd / recvcheck /recvcheck
3
+ /recvcheck
Original file line number Diff line number Diff line change 1
- all : build test lint
1
+ .PHONY : clean lint test build
2
2
3
- download :
4
- go mod download
3
+ default : clean lint test build
5
4
6
- build : download
7
- go build -C cmd/recvcheck
5
+ clean :
6
+ rm -rf coverage.txt
8
7
9
- test :
8
+ build :
9
+ go build -ldflags " -s -w" -trimpath ./cmd/recvcheck/
10
+
11
+ test : clean
10
12
go test -race -coverprofile=coverage.txt .
11
13
12
14
lint :
Original file line number Diff line number Diff line change 1
1
# recvcheck
2
- [ ![ .github/workflows/build.yaml] ( https://github.com/raeperd/recvcheck/actions/workflows/build.yaml/badge.svg )] ( https://github.com/raeperd/recvcheck/actions/workflows/build.yaml ) [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/raeperd/recvcheck )] ( https://goreportcard.com/report/github.com/raeperd/recvcheck ) [ ![ codecov ] ( https://codecov.io/gh/raeperd/recvcheck/graph/badge.svg?token=fPYgEHlq1e )] ( https://codecov.io/gh/raeperd/recvcheck )
2
+ [ ![ .github/workflows/build.yaml] ( https://github.com/raeperd/recvcheck/actions/workflows/build.yaml/badge.svg )] ( https://github.com/raeperd/recvcheck/actions/workflows/build.yaml ) [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/raeperd/recvcheck )] ( https://goreportcard.com/report/github.com/raeperd/recvcheck )
3
3
Golang linter for check receiver type in method
4
4
5
5
## Motivtation
You can’t perform that action at this time.
0 commit comments