File tree Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Expand file tree Collapse file tree 1 file changed +42
-0
lines changed Original file line number Diff line number Diff line change 3131 - name : Run checks
3232 run : make get-deps check
3333
34+ - name : Upload coverage artifact
35+ uses : actions/upload-artifact@v4
36+ with :
37+ name : coverage-${{ matrix.go }}
38+ path : test/coverage.out
39+
40+ coverage :
41+ name : Publish Coverage
42+ needs : check
43+ runs-on : ubuntu-latest
44+ steps :
45+ - name : Checkout code
46+ uses : actions/checkout@v4
47+
48+ - name : Download coverage artifact
49+ uses : actions/download-artifact@v4
50+ with :
51+ name : coverage-stable
52+
53+ - name : Setup go
54+ uses : actions/setup-go@v5
55+ with :
56+ go-version : ' stable'
57+
58+ - name : Convert go coverage to corbetura format
59+ run : |
60+ go install github.com/boumenot/gocover-cobertura@latest
61+ gocover-cobertura -by-files < coverage.out > coverage.xml
62+
63+ - name : Get PR number
64+ uses : jwalton/gh-find-current-pr@v1
65+ id : finder
66+
67+ - name : Add Coverage PR Comment
68+ uses : 5monkeys/cobertura-action@master
69+ with :
70+ path : coverage.xml
71+ skip_covered : false
72+ minimum_coverage : 0
73+ fail_below_threshold : true
74+ pull_request_number : ${{ steps.finder.outputs.pr }}
75+
3476 test :
3577 name : Docker tests
3678 runs-on : ubuntu-latest
You can’t perform that action at this time.
0 commit comments