File tree Expand file tree Collapse file tree 2 files changed +59
-18
lines changed
Expand file tree Collapse file tree 2 files changed +59
-18
lines changed Original file line number Diff line number Diff line change 1+ name : Go
2+
3+ on :
4+ push :
5+ branches : [master]
6+ paths :
7+ - " **.go"
8+ - " go.mod"
9+ - " go.sum"
10+ pull_request :
11+ branches : [master]
12+ paths :
13+ - " **.go"
14+ - " go.mod"
15+ - " go.sum"
16+
17+ jobs :
18+ golangci :
19+ name : Lint
20+ runs-on : ubuntu-latest
21+ steps :
22+ # step 1: checkout repository code
23+ - name : Checkout code into workspace directory
24+ uses : actions/checkout@v4
25+
26+ # step 2: set up go
27+ - name : Set up Go
28+ uses : actions/setup-go@v5
29+ with :
30+ go-version : stable
31+
32+ # step 3: run golangci-lint
33+ - name : Run golangci-lint
34+ uses : golangci/golangci-lint-action@v6
35+ with :
36+ version : latest
37+ args : --timeout=5m
38+
39+ test :
40+ name : Test
41+ runs-on : ubuntu-latest
42+ steps :
43+ # step 1: checkout repository code
44+ - name : Checkout code into workspace directory
45+ uses : actions/checkout@v4
46+
47+ # step 2: set up go
48+ - name : Set up Go
49+ uses : actions/setup-go@v5
50+ with :
51+ go-version : stable
52+
53+ # step 3: install dependencies
54+ - name : Install all Go dependencies
55+ run : go mod download
56+
57+ # step 4: run test
58+ - name : Run coverage
59+ run : go test -race -coverprofile=coverage.out -covermode=atomic ./...
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments