Comments (10)
Hey @gliptak Yes this does indeed work for go: https://github.com/codecov/example-go
You can configure your own http post of report content to Codecov if the shell script is not desired. We are also looking into packaged options, e.g., apt-get, yum, etc.
You can also use the python package: pip install --user codecov && codecov
.
Thanks!
from codecov-bash.
Thank you for the pointer. Would you have also have details on the parameters of HTTP post (an maybe a wget
/curl
example)?
from codecov-bash.
Sure :)
Here is the minimum requirements, you can discover the remaining arguments here
curl -X POST \
-H 'Accept: application/json' \
--data-binary @coverage.txt \
"https://codecov.io/upload/v2?commit=<sha>&token=<uuid-token>"
from codecov-bash.
I came up with (public repo so no token
required?):
curl -X POST -H 'Accept: application/json' --data-binary @coverage.txt "https://codecov.io/upload/v2?commit=$TRAVIS_COMMIT&pr=$TRAVIS_PULL_REQUEST&slug=$TRAVIS_REPO_SLUG"
but it throws No such file or directory
Would I need additional parameters?
https://travis-ci.org/cloudflare/cloudflare-go/jobs/196191034
from codecov-bash.
Hey @gliptak
No such file or directory
would be an issue with the file coverage.txt
not existing. I'm not sure what your coverage file name is, but it appears to not be coverage.txt
. I just used that name as an example. The bash uploader can detect common files names here.
There are other requirements for the "no token" feature with travis. Please check them all out here.
Thank you! I'm happy to help our more 👍
from codecov-bash.
@stevepeak Thank you for helping me with this.
https://travis-ci.org/cloudflare/cloudflare-go/jobs/196438911
$ ls -l coverage.txt
-rw-r--r-- 1 travis travis 23538 Jan 29 22:48 coverage.txt
$ {:"curl -X POST -H 'Accept"=>"application/json' --data-binary @coverage.txt \"https://codecov.io/upload/v2?commit=$TRAVIS_COMMIT&pr=$TRAVIS_PULL_REQUEST&slug=$TRAVIS_REPO_SLUG\""}
/home/travis/build.sh: line 57: application/json' --data-binary @coverage.txt "https://codecov.io/upload/v2?commit=79f713c3504b71309726644ee12a9c85a76ed0cb&pr=111&slug=cloudflare/cloudflare-go"}: No such file or directory
If the coverage.txt
files exists, what other reasons might be for No such file or directory
?
from codecov-bash.
Can you try this:
- $ {:"curl -X POST -H 'Accept"=>"application/json' --data-binary @coverage.txt \"https://codecov.io/upload/v2?commit=$TRAVIS_COMMIT&pr=$TRAVIS_PULL_REQUEST&slug=$TRAVIS_REPO_SLUG\""}
+ curl -X POST --data-binary @coverage.txt "https://codecov.io/upload/v2?commit=$TRAVIS_COMMIT&pr=$TRAVIS_PULL_REQUEST&slug=$TRAVIS_REPO_SLUG"
I have not used the prior technique and this /home/travis/build.sh: line 57: application/json'
tells me something is wrong with the format.
from codecov-bash.
OK, an actual error, a bit confusing as we should be able to skip the token?
https://travis-ci.org/cloudflare/cloudflare-go/jobs/196470037
<div class="status">400</div>
<div class="reason">Please provide the repository token to upload reports via `-t :repository-token`</div>
from codecov-bash.
This would be from the lack of Travis variables provided. I should have included them in the full request. So here we go 😄
curl -X POST --data-binary @coverage.txt "https://codecov.io/upload/v2?commit=$TRAVIS_COMMIT&pr=$TRAVIS_PULL_REQUEST&slug=$TRAVIS_REPO_SLUG&job=$TRAVIS_JOB_ID&build=$TRAVIS_JOB_NUMBER&branch=$TRAVIS_BRANCH"
Note the addition of
job
andbuild
arguments.
from codecov-bash.
Still wants the token ...
https://travis-ci.org/cloudflare/cloudflare-go/jobs/196819806#L354
<div class="status">400</div>
<div class="reason">Please provide the repository token to upload reports via `-t :repository-token`</div>
from codecov-bash.
Related Issues (20)
- Appveyor PR commit SHA wrong HOT 4
- Add checksum for env script HOT 3
- Issues with documented validation script HOT 13
- [Swift] Implement support for llvm-cov json exporter
- Codecov failure: Bash script checksums do not match published values. Please contact [email protected] immediately. HOT 1
- [FR?] Uploading reports as archive HOT 3
- Unable to locate build via Github Actions API HOT 1
- The CodeCov Bash uploader breaks uploads when run within GitHub Actions on GitHub Enterprise
- codecov-bash exits zero on 400 error
- Both `Content-Encoding` and `X-Content-Encoding` are set
- CI continues despite failure to release HOT 8
- Issue with codecov checksum HOT 1
- Codecov with Travis - Specified coverage file not found. HOT 1
- In case of multiple files as arguments, only first file is getting selected. Getting file not found for second file HOT 1
- Source code filepath with spaces is not recognised and 404 is returned
- Make Docker detection last in `env` HOT 1
- Unpin this repository
- Could not determine repo and owner HOT 2
- Add support for WoodpeckerCI HOT 1
- Associating commit hashes to branches
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from codecov-bash.