File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- name : codecov
1+ name : Run tests and upload coverage
22
3- on : [push, pull_request]
3+ on :
4+ push
45
56jobs :
6- run :
7- strategy :
8- matrix :
9- os : [ ubuntu-latest, macos-latest ]
10- go : [ 1.19.x ]
11- runs-on : ${{ matrix.os }}
7+ test :
8+ name : Run tests and collect coverage
9+ runs-on : ubuntu-latest
1210 steps :
13- - uses : actions/checkout@main
11+ - name : Checkout
12+ uses : actions/checkout@v4
13+ with :
14+ fetch-depth : 2
1415
15- - name : Set up Go
16- uses : actions/setup-go@v3
17- with :
18- go-version : ${{ matrix.go }}
16+ - name : Set up Go
17+ uses : actions/setup-go@v5
1918
20- - name : Generate Coverage Report
21- run : go test ./... -coverprofile=coverage.txt -covermode=atomic
19+ - name : Install dependencies
20+ run : go mod download
2221
23- - name : Upload Coverage Report to Codecov
24- uses : codecov/codecov-action@v3
25- with :
26- file : ./coverage.txt
22+ - name : Run tests
23+ run : go test -coverprofile=coverage.txt
24+
25+ - name : Upload results to Codecov
26+ uses : codecov/codecov-action@v5
27+ with :
28+ token : ${{ secrets.CODECOV_TOKEN }}
You can’t perform that action at this time.
0 commit comments