envd icon indicating copy to clipboard operation
envd copied to clipboard

feat(CI): Merge the unit test and e2e test coverage report in CI.yaml

Open gaocegege opened this issue 2 years ago โ€ข 2 comments

Description

https://github.com/tensorchord/envd/blob/main/.github/workflows/CI.yml#L203

We should merge e2e test coverage e2e-coverage.out and unit test coverage report coverage.out into one, and push the new one to coveralls.


Message from the maintainers:

Love this enhancement proposal? Give it a ๐Ÿ‘. We prioritise the proposals with the most ๐Ÿ‘.

gaocegege avatar Jul 20 '22 08:07 gaocegege

Hi @gaocegege, I'd like to help with this issue.

In .github/workflows/CI.yml, I found that there are four test coverage report files:

  • coverage.out
  • e2e-cli-coverage.out
  • e2e-doc-coverage.out
  • e2e-lang-coverage.out

As your designed, will we merge these files and put it into a new file like *.out?

BTW, I noticed that in L251-256, there is a section for sending report to coveralls.io.

# - name: Send coverage
#   env:
#     COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
#   run: |
#     gocovmerge e2e-coverage.out coverage.out > final.out
#     goveralls -coverprofile=final.out -service=github

Is it related to this issue? Will we finish this feature on this base?

lunarwhite avatar Sep 11 '22 08:09 lunarwhite

Thanks for your interest!

As your designed, will we merge these files and put it into a new file like *.out?

Yep.

Is it related to this issue? Will we finish this feature on this base?

Yep I tried it before but it does not work as expected. The test coverage only includes the coverage.out, instead of the two files.

I think this issue may be not easy, thus please ask if there is any problem.

BTW, if you are interested in the envd code, please also have a look at this issue. https://github.com/tensorchord/envd/issues/663

It should be a good entrypoint to dive into the source code of envd.

gaocegege avatar Sep 11 '22 13:09 gaocegege

Here is a tool might be helpful https://github.com/wadey/gocovmerge

@lunarwhite

If you are too busy for working on this problem, I would like to help.

cutecutecat avatar Nov 16 '22 07:11 cutecutecat

Thanks for your interest! Please go ahead. I think @lunarwhite did not have the bandwidth for the issue.

/assign @cutecutecat

gaocegege avatar Nov 16 '22 08:11 gaocegege

@cutecutecat Feel free to take this issue!

lunarwhite avatar Nov 16 '22 08:11 lunarwhite

I have tested gocovmerge and it works well on these coverage files. I think it much better to write an Github Action plugin to wrapper it, instead of clone and run gocovmerge from CI. Then we only need to refer that plagin, it would be much more readiable.

I would pick goaction to build this plugin.

cutecutecat avatar Nov 16 '22 09:11 cutecutecat

Cool!

gaocegege avatar Nov 16 '22 09:11 gaocegege