Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you provide a code coverage badge? #192

Open
xuanswe opened this issue May 15, 2021 · 9 comments
Open

Could you provide a code coverage badge? #192

xuanswe opened this issue May 15, 2021 · 9 comments

Comments

@xuanswe
Copy link

xuanswe commented May 15, 2021

Could you provide a code coverage badge?

Ex. https://github.com/marketplace/actions/codecov

@escamoteur
Copy link
Collaborator

Unfortunately I didn't really found to look into it how to setup this correctly.

@xuanswe
Copy link
Author

xuanswe commented May 15, 2021

  1. you need to register your project on codecov.io. For my case, I just allow codecov connect to my GitHub account.
  2. Just add a step like what I am doing in my package. For opensource public package, you don't need to send a token. The main thing is to make sure the lcov.info path is correct and start from the root of your repository.

This is my config: https://github.com/zenonine/navi/blob/master/.github/workflows/verify-navi.yml

- uses: codecov/codecov-action@v1
        with:
          files: ./navi/coverage/lcov.info

@escamoteur
Copy link
Collaborator

that's a github action?

@xuanswe
Copy link
Author

xuanswe commented May 15, 2021

codecov/codecov-action@v1 is a github action. Yes.

@xuanswe
Copy link
Author

xuanswe commented May 15, 2021

I am seeing you are using it, right?

https://github.com/fluttercommunity/get_it/blob/master/.github/workflows/dart.yml

    # Code coverage can be acitivated once its ready.
    - name: Upload coverage to codecov
      uses: codecov/codecov-action@v1
      with:
        token: ${{ secrets.CODECOV_TOKEN }}

@escamoteur
Copy link
Collaborator

honestly I can't remember having added that 🙄

@escamoteur
Copy link
Collaborator

as this repo is part of the fluttter community organisation I first have to get the access right from them

@escamoteur
Copy link
Collaborator

@lukepighetti can you add a coverage badge? you updated the CI stuff thankfully

@hughesjs
Copy link
Contributor

Could I ask why you want this? Code coverage is a pretty meaningless metric...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants