Skip to content

Latest commit

 

History

History
59 lines (42 loc) · 1.6 KB

README.md

File metadata and controls

59 lines (42 loc) · 1.6 KB

Action usage Golang test codecov

go-cover-merge

📖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]
Loading

🌞Thanks to @wadey and his project gocovmerge

Usage

- 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

Examples

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