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

Advice needed :-) on implementation of Codecov without key on Travis #12

Open
Cleop opened this issue Jan 15, 2017 · 9 comments
Open

Advice needed :-) on implementation of Codecov without key on Travis #12

Cleop opened this issue Jan 15, 2017 · 9 comments
Labels

Comments

@Cleop
Copy link
Member

Cleop commented Jan 15, 2017

I'm trying to use Codecov on Travis without using the key as you told me it can be done without and so in the name of efficiency I want to learn how it's done!
My .travis.yml and package.json look like yours:
https://github.com/Cleop/triumph-website/blob/master/.travis.yml#L3-L6
https://github.com/Cleop/triumph-website/blob/master/package.json#L10

And I'm registered on Codecov and have selected the repo.

However I'm not getting any data on Codecov when I merge PR or on the badge on my README.

Any advice would be greatly appreciated 😄 Thank you!

@Cleop Cleop added the question label Jan 15, 2017
@Cleop Cleop changed the title Advice needed :-) on implementation of Codecov Advice needed :-) on implementation of Codecov without key on Travis Jan 15, 2017
@Cleop
Copy link
Member Author

Cleop commented Jan 15, 2017

The last few amends I've made using Travis to try and fix this have all failed on the build. The only one which passed in Travis but didn't have working Codecov looked like this in the package.json:

before_install:

which is what I had used in a previous project which had used the token.

@nelsonic
Copy link
Member

Hi @Cleop thank you for creating this question! ❤️
Are the instructions in the readme for setting up Codecov no longer valid? 😞
I'm just about to set this up for my weekend project: https://github.com/dwyl/stars so will be checking if I can replicate it. will report back shortly. thanks! 👍

nelsonic added a commit to dwyl/stars that referenced this issue Jan 15, 2017
@nelsonic
Copy link
Member

nelsonic commented Jan 15, 2017

Hi @Cleop,
Haven't "forgotten" you. 💭
I've implemented Travis-CI with Codecov including the PR comments: dwyl/stars#3 (comment)
the PR isn't quite done yet but you can see that it's working with the following .travis.yml:
https://github.com/dwyl/stars/blob/e084a225ce43f2a019720955111c41ac1d1d9bf7/.travis.yml#L8-L11

Did you have any luck? 🍀

@Cleop
Copy link
Member Author

Cleop commented Jan 16, 2017

I've managed to get Travis to pass by removing the coverage script I had in my package.json before for istanbul. However I'm still getting codecov: unknown on my badge on the readme and I have no commit histories in my codecov profile.

Any ideas @nelsonic?

@nelsonic
Copy link
Member

@Cleop good question, we could do a hangout to figure it if you have time... 🤔

@nelsonic
Copy link
Member

@Cleop were you able to get this working?

@Gamecock
Copy link

Gamecock commented Jan 22, 2019

@nelsonic I found this trying to resolve the codecov badge showing unknown in Github, when codecov.io has coverage metrics, and I noticed the dwyl/stars#3 also shows codecov status as unknown. Does that feature no longer work?

@nelsonic
Copy link
Member

@Gamecock Good question.
It appears that recently Codecov have changed how they implement coverage via CI service.
I recently updated on of our JS projects https://github.com/dwyl/learn-json-web-tokens and it required me adding a CODECOV_TOKEN environment variable to Travis-CI to get it to work. 🙄

The feature definitely works. We use Codecov on over 50 dwyl repositories: https://codecov.io/gh/dwyl
Ironically, the repo you have linked to (stars) is on page 3 of our list of repos:
https://codecov.io/gh/dwyl?page=3 and shows 100% coverage:
image
So the badge just needs to be updated ...

[![codecov](https://codecov.io/gh/dwyl/stars/branch/master/graph/badge.svg)](https://codecov.io/gh/dwyl/stars)

codecov

[![codecov.io](https://img.shields.io/codecov/c/github/dwyl/stars/master.svg?style=flat-square)](http://codecov.io/github/dwyl/stars?branch=master)

codecov.io

@Gamecock
Copy link

Thanks, this pointed me in the correct direction. I just had to add ?token=:graph_token to the end of my request.
https://docs.codecov.io/reference#about-graphs

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

No branches or pull requests

3 participants