File tree Expand file tree Collapse file tree 5 files changed +103
-0
lines changed Expand file tree Collapse file tree 5 files changed +103
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : go
2
+
3
+ on :
4
+ push :
5
+ branches : [ main ]
6
+ pull_request :
7
+ branches : [ main ]
8
+
9
+ jobs :
10
+ test :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - name : Checkout code
14
+ uses : actions/checkout@v3
15
+
16
+ - name : Set up Go
17
+ uses : actions/setup-go@v3
18
+ with :
19
+ go-version-file : go.mod
20
+
21
+ - name : Run tests
22
+ run : go test -race -coverprofile=coverage.out ./...
23
+
24
+ - name : Upload coverage
25
+ uses : codecov/codecov-action@v3
26
+ with :
27
+ files : ./coverage.out
28
+
29
+ lint :
30
+ runs-on : ubuntu-latest
31
+ steps :
32
+ - name : Checkout code
33
+ uses : actions/checkout@v3
34
+
35
+ - name : Set up Go
36
+ uses : actions/setup-go@v3
37
+ with :
38
+ go-version-file : go.mod
39
+
40
+ - name : Run linters
41
+ uses : golangci/golangci-lint-action@v3
42
+ with :
43
+ version : v1.50.0
Original file line number Diff line number Diff line change
1
+ name : release
2
+
3
+ on :
4
+ push :
5
+ tags : [ v* ]
6
+
7
+ jobs :
8
+ release :
9
+ runs-on : ubuntu-latest
10
+ steps :
11
+ - name : Checkout code
12
+ uses : actions/checkout@v3
13
+ with :
14
+ fetch-depth : 0
15
+
16
+ - name : Set up Go
17
+ uses : actions/setup-go@v3
18
+ with :
19
+ go-version-file : go.mod
20
+
21
+ - name : Run GoReleaser
22
+ uses : goreleaser/goreleaser-action@v3
23
+ with :
24
+ version : latest
25
+ args : release --rm-dist
26
+ env :
27
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ linters :
2
+ disable-all : true
3
+ enable :
4
+ # enabled by default:
5
+ - errcheck
6
+ - gosimple
7
+ - govet
8
+ - ineffassign
9
+ - staticcheck
10
+ - typecheck
11
+ - unused
12
+ # disabled by default:
13
+ - gocritic
14
+ - gofumpt
15
+
16
+ linters-settings :
17
+ gocritic :
18
+ enabled-tags :
19
+ - diagnostic
20
+ - style
21
+ - performance
22
+ - experimental
23
+ - opinionated
Original file line number Diff line number Diff line change
1
+ builds :
2
+ - skip : true
3
+
4
+ changelog :
5
+ sort : asc
Original file line number Diff line number Diff line change 1
1
# check
2
2
3
+ [ ![ ci] ( https://github.com/junk1tm/check/actions/workflows/go.yml/badge.svg )] ( https://github.com/junk1tm/check/actions/workflows/go.yml )
4
+ [ ![ docs] ( https://pkg.go.dev/badge/github.com/junk1tm/check.svg )] ( https://pkg.go.dev/github.com/junk1tm/check )
5
+ [ ![ report] ( https://goreportcard.com/badge/github.com/junk1tm/check )] ( https://goreportcard.com/report/github.com/junk1tm/check )
6
+ [ ![ codecov] ( https://codecov.io/gh/junk1tm/check/branch/main/graph/badge.svg )] ( https://codecov.io/gh/junk1tm/check )
7
+
3
8
Convenience helpers to perform validations of any kind
4
9
5
10
## 📦 Install
You can’t perform that action at this time.
0 commit comments