File tree Expand file tree Collapse file tree 2 files changed +78
-0
lines changed
Expand file tree Collapse file tree 2 files changed +78
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ branches :
4+ - master
5+ - main
6+ pull_request :
7+ branches :
8+ - master
9+ - main
10+
11+ name : build
12+ jobs :
13+ build :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - uses : actions/checkout@v3
17+ with :
18+ fetch-depth : 2
19+ - uses : actions/setup-go@v3
20+ with :
21+ go-version : ' 1.21'
22+ - name : Run coverage
23+ run : go test -race -coverprofile=coverage.out -covermode=atomic ./...
24+ - name : Upload coverage to Codecov
25+ run : bash <(curl -s https://codecov.io/bash)
26+ test :
27+ strategy :
28+ matrix :
29+ go-version : [1.20.x, 1.21.x]
30+ platform : [ubuntu-latest, macos-latest, windows-latest]
31+ runs-on : ${{ matrix.platform }}
32+ steps :
33+ - name : Install Go
34+ if : success()
35+ uses : actions/setup-go@v3
36+ with :
37+ go-version : ${{ matrix.go-version }}
38+ - name : Checkout code
39+ uses : actions/checkout@v3
40+ - name : Run tests
41+ run : go test -v -covermode=count ./...
Original file line number Diff line number Diff line change 1+ name : golangci-lint
2+ on :
3+ push :
4+ tags :
5+ - v*
6+ branches :
7+ - master
8+ - main
9+ pull_request :
10+ jobs :
11+ golangci :
12+ name : lint
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v3
16+ - name : golangci-lint
17+ uses : golangci/golangci-lint-action@v2
18+ with :
19+ version : v1.54.2
20+
21+ # Optional: working directory, useful for monorepos
22+ # working-directory: somedir
23+
24+ # Optional: golangci-lint command line arguments.
25+ # args: --issues-exit-code=0
26+
27+ # Optional: show only new issues if it's a pull request. The default value is `false`.
28+ # only-new-issues: true
29+
30+ # Optional: if set to true then the action will use pre-installed Go.
31+ # skip-go-installation: true
32+
33+ # Optional: if set to true then the action don't cache or restore ~/go/pkg.
34+ # skip-pkg-cache: true
35+
36+ # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
37+ # skip-build-cache: true
You can’t perform that action at this time.
0 commit comments