File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed
Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+
2+ name : Codecov Scan
3+
4+ on :
5+ push :
6+ branches :
7+ - main
8+ pull_request :
9+ workflow_dispatch :
10+
11+ jobs :
12+ run :
13+ runs-on : ubuntu-latest
14+ env :
15+ go-version : ' stable'
16+
17+ steps :
18+ - name : Checkout code
19+ uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
20+
21+ - name : Set up Go
22+ uses : actions/setup-go@0c52d547c9bc32b1aa3301fd7a9cb496313a4491 # v5.0.0
23+ with :
24+ go-version : ${{ env.go-version }}
25+ env :
26+ GOPROXY : direct
27+ GONOSUMDB : " *"
28+ GOPRIVATE : https://github.com/CheckmarxDev/ # Add your private organization url here
29+
30+ - name : Install dependencies
31+ run : go install golang.org/x/tools/cmd/cover@latest
32+
33+ - name : Run tests and generate coverage
34+ run : |
35+ go test ./... -coverpkg=./... -v -coverprofile cover.out
36+
37+
38+ - name : Upload coverage to Codecov
39+ uses : codecov/codecov-action@84508663e988701840491b86de86b666e8a86bed # v4.3.0
40+ with :
41+ token : ${{ secrets.CODECOV_TOKEN }}
42+ files : ./cover.out
43+ flags : target=auto
44+ fail_ci_if_error : true
45+ verbose : false
You can’t perform that action at this time.
0 commit comments