devstream icon indicating copy to clipboard operation
devstream copied to clipboard

Proposal(Need Discussion): Show code coverage every time you submit a PR

Open Gala-RX opened this issue 3 years ago • 5 comments

What Would You Like to Add? Why Is This Needed?

I found an interesting link to code showing coverage, as shown this link https://github.com/coverallsapp/github-action, feels cool

Design

1 add the action of unit tests to the github workflow

     - name: Run unit tests
        run: make test 

2 add the action of coveralls to the github workflow

  - name: Install goveralls 
    run: go install github.com/mattn/goveralls@latest
  - name: Send coverage
    env:
      COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
     run: goveralls -coverprofile=covprofile -service=githuh

3 add final job to the github workflow

   finish:
      needs: test
      runs-on: ubuntu-latest
      steps:
      - name: Coveralls Finished
        uses: coverallsapp/github-action@master
        with:
          github-token: ${{ secrets.github_token }}
          parallel-finished: true

Anything else

Please join us to discuss! 🙌

Gala-RX avatar Jul 05 '22 11:07 Gala-RX

I think it's great! Any CI that contributes to enhanced code robustness is advocated.

iyear avatar Jul 05 '22 14:07 iyear

@iyear care to contribute a PR for this issue?

IronCore864 avatar Jul 08 '22 02:07 IronCore864

@rxhuster Would you mind contributing a PR for this? If you are too busy to write it, please feel free to contact me and I will help you to implement this proposal :).

iyear avatar Jul 08 '22 09:07 iyear

@rxhuster Would you mind contributing a PR for this? If you are too busy to write it, please feel free to contact me and I will help you to implement this proposal :).

ok,i wii try

Gala-RX avatar Jul 10 '22 04:07 Gala-RX

@rxhuster May I ask if you are still working on it? If you encounter some difficulties or don't have time to do it, feel free to contact me and I will help you to finish it.

iyear avatar Jul 19 '22 03:07 iyear