How to display picture in artifacts on CircleCI on Github Readme

Viewed 534

My test suite outputs a lcov report and a badge that displays percent coverage. The badge is a png that's in the artifacts folder.

I try to embed the image as follows, but it only displays the alt text on my Github readme.md. The link is correct in that if I copy and paste it, the page takes me to the file I want.

Is the fact that the link is actually an api call the reason why I can't display the picture? If so, how can I do this? Below is my (editted) code:

![Statement Coverage](https://circleci.com/api/v1/project/myorg/myrepo/latest/artifacts/0/$CIRCLE_ARTIFACTS/coverage.png?branch=master&filter=successful&circle-token=mytoken)

It also doesn't work if I try and just use an <img/> tag in the readme.

1 Answers

When you consider the list of badges to include (like the ones exposed by shields.io), none of those URL involve an API call.

So if you can, try and reference a fixed URL instead of an API one.

Related