📖go-cover-merge is an Action used to merge several golang
coverage files generated by:
go test -coverprofile
It will do something like:
graph TD
1[cover_1.out]-->0[cover_sum.out]
2[cover_2.out]-->0[cover_sum.out]
3[cover_3.out]-->0[cover_sum.out]
4[cover_4.out]-->0[cover_sum.out]
5[cover_5.out]-->0[cover_sum.out]
🌞Thanks to @wadey and his project gocovmerge
- uses: cutecutecat/go-cover-merge@v1
with:
# Input dir containing coverage files(.out) to be merged.
input_dir: ''
# Output file coverage file(.out) of merged files.
# Default: coverage_sum.out
output_file: ''
See action.yml
You should indicate input_dir
for merged coverage files. go-cover-merge
will pick all files end with .out
in this directory.
⚠︎Caution: We recommend there is nothing except files which want to be merged at input_dir
.
- uses: cutecutecat/go-cover-merge@v1
with:
input_dir: test
output_file: ./coverage_sum.out
If you don't indicate output_file
, it will be coverage_sum.out
as default at current directory.
- uses: cutecutecat/go-cover-merge@v1
with:
input_dir: test