File tree Expand file tree Collapse file tree 3 files changed +96
-0
lines changed Expand file tree Collapse file tree 3 files changed +96
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Tests
2
+ on : [push, pull_request]
3
+
4
+ permissions :
5
+ contents : read
6
+
7
+ jobs :
8
+ build :
9
+ strategy :
10
+ fail-fast : false
11
+ matrix :
12
+ os : [ubuntu-latest, windows-latest, macos-latest]
13
+ runs-on : ${{ matrix.os }}
14
+
15
+ steps :
16
+ - name : Set up Go 1.19
17
+ uses : actions/setup-go@v3
18
+ with :
19
+ go-version : 1.19
20
+
21
+ - name : Check out code
22
+ uses : actions/checkout@v3
23
+
24
+ - name : Restore Go modules cache
25
+ uses : actions/cache@v3
26
+ with :
27
+ path : ~/go/pkg/mod
28
+ key : go-${{ runner.os }}-${{ hashFiles('go.mod') }}
29
+ restore-keys : |
30
+ go-${{ runner.os }}-
31
+
32
+ - name : Download dependencies
33
+ run : go mod download
34
+
35
+ - name : Run tests
36
+ run : go test -race ./...
37
+
38
+ - name : Build
39
+ run : go build -v .
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
+ - main
8
+ pull_request :
9
+ permissions :
10
+ contents : read
11
+ jobs :
12
+ golangci :
13
+ name : lint
14
+ runs-on : ubuntu-latest
15
+ steps :
16
+ - uses : actions/setup-go@v3
17
+ with :
18
+ go-version : ' ^1.19.0'
19
+ - uses : actions/checkout@v3
20
+ - name : golangci-lint
21
+ uses : golangci/golangci-lint-action@v3
22
+ with :
23
+ # Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
24
+ version : latest
25
+
26
+ # Optional: working directory, useful for monorepos
27
+ # working-directory: somedir
28
+
29
+ # Optional: golangci-lint command line arguments.
30
+ # args: --issues-exit-code=0
31
+
32
+ # Optional: show only new issues if it's a pull request. The default value is `false`.
33
+ # only-new-issues: true
34
+
35
+ # Optional: if set to true then the all caching functionality will be complete disabled,
36
+ # takes precedence over all other caching options.
37
+ # skip-cache: true
38
+
39
+ # Optional: if set to true then the action don't cache or restore ~/go/pkg.
40
+ # skip-pkg-cache: true
41
+
42
+ # Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
43
+ # skip-build-cache: true
Original file line number Diff line number Diff line change
1
+ name : release
2
+ on :
3
+ push :
4
+ tags :
5
+ - " v*"
6
+ permissions :
7
+ contents : write
8
+
9
+ jobs :
10
+ release :
11
+ runs-on : ubuntu-latest
12
+ steps :
13
+ - uses : actions/checkout@v3
14
+ - uses : cli/gh-extension-precompile@v1
You can’t perform that action at this time.
0 commit comments