File tree Expand file tree Collapse file tree 1 file changed +29
-26
lines changed
Expand file tree Collapse file tree 1 file changed +29
-26
lines changed Original file line number Diff line number Diff line change 11name : CI
22
33on :
4- push :
5- branches : [ main ]
6- pull_request :
7- branches : [ main ]
4+ push :
5+ branches : [ main ]
6+ pull_request :
7+ branches : [ main ]
88
99jobs :
10- test :
11- runs-on : ubuntu-latest
12- steps :
13- - uses : actions/checkout@v3
10+ test :
11+ runs-on : ubuntu-latest
12+ steps :
13+ - uses : actions/checkout@v3
1414
15- - name : Set up Go
16- uses : actions/setup-go@v4
17- with :
18- go-version : ' 1.21'
15+ - name : Set up Go
16+ uses : actions/setup-go@v4
17+ with :
18+ go-version : ' 1.21'
1919
20- - name : Check format
21- run : |
22- if [ -n "$(gofmt -l .)" ]; then
23- echo "Files not properly formatted:"
24- gofmt -l .
25- exit 1
26- fi
20+ - name : Check format
21+ run : |
22+ if [ -n "$(gofmt -l .)" ]; then
23+ echo "Files not properly formatted:"
24+ gofmt -l .
25+ exit 1
26+ fi
2727
28- - name : Test
29- run : |
30- go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
28+ - name : Run Tests with Coverage
29+ run : |
30+ go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
3131
32- - name : Upload coverage
33- uses : codecov/codecov-action@v3
34- with :
35- file : ./coverage.txt
32+ - name : Upload coverage reports to Codecov
33+ uses : codecov/codecov-action@v3
34+ with :
35+ token : ${{ secrets.CODECOV_TOKEN }}
36+ files : ./coverage.txt
37+ fail_ci_if_error : true
38+ verbose : true
You can’t perform that action at this time.
0 commit comments