File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,13 +2,13 @@ name: CI
22
33on :
44 push :
5- branches : [ main, develop ]
5+ branches : [ main ]
66 pull_request :
7- branches : [ main, develop ]
7+ branches : [ main ]
88
99jobs :
10- test :
11- name : Test
10+ lint :
11+ name : Lint
1212 runs-on : ubuntu-latest
1313
1414 steps :
@@ -18,17 +18,17 @@ jobs:
1818 - name : Set up Go
1919 uses : actions/setup-go@v4
2020 with :
21- go-version : 1.25
21+ go-version : ' stable '
2222
2323 - name : Cache Go modules
2424 uses : actions/cache@v3
2525 with :
2626 path : |
2727 ~/.cache/go-build
2828 ~/go/pkg/mod
29- key : ${{ runner.os }}-go-1.25 -${{ hashFiles('**/go.sum') }}
29+ key : ${{ runner.os }}-go-stable -${{ hashFiles('**/go.sum') }}
3030 restore-keys : |
31- ${{ runner.os }}-go-1.25 -
31+ ${{ runner.os }}-go-stable -
3232
3333 - name : Download dependencies
3434 run : go mod download
4848 version : latest
4949 args : --timeout=5m
5050
51+ test :
52+ name : Test
53+ runs-on : ubuntu-latest
54+
55+ steps :
56+ - name : Check out code
57+ uses : actions/checkout@v4
58+
59+ - name : Set up Go
60+ uses : actions/setup-go@v4
61+ with :
62+ go-version : ' stable'
63+
64+ - name : Cache Go modules
65+ uses : actions/cache@v3
66+ with :
67+ path : |
68+ ~/.cache/go-build
69+ ~/go/pkg/mod
70+ key : ${{ runner.os }}-go-stable-${{ hashFiles('**/go.sum') }}
71+ restore-keys : |
72+ ${{ runner.os }}-go-stable-
73+
74+ - name : Download dependencies
75+ run : go mod download
76+
5177 - name : Run tests
5278 run : go test -v -race -coverprofile=coverage.out ./...
5379
5480 - name : Show test coverage
5581 run : go tool cover -func=coverage.out
82+
83+ - name : Upload coverage to Codecov
84+ uses : codecov/codecov-action@v3
85+ with :
86+ file : ./coverage.out
87+ flags : unittests
88+ name : codecov-umbrella
89+ fail_ci_if_error : false
You can’t perform that action at this time.
0 commit comments