Created
July 9, 2024 16:00
-
-
Save froi/bb0e42e5c17b0e52286bb6aa8697e357 to your computer and use it in GitHub Desktop.
Testing Roadie's coverage API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env sh | |
# You will need to get an API token to use this. | |
# Take a look at the Roadie docs: https://roadie.io/docs/integrations/codecoverage/ | |
entity="" | |
content_type="Content-Type:text/plain" | |
coverage_type="lcov" | |
coverage_file="./coverage_output/coverage.lcov" | |
url="https://api.roadie.so/api/code-coverage/report?entity=${entity}&coverageType=${coverage_type}" | |
response=$(curl -X POST "${url}" \ | |
-H "${content_type}" \ | |
-H "Authorization: Bearer ${ROADIE_API_TOKEN}" \ | |
-d coverage_file) | |
echo "Post result: ${response}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment