Skip to content

Instantly share code, notes, and snippets.

@froi
Created July 9, 2024 16:00
Show Gist options
  • Save froi/bb0e42e5c17b0e52286bb6aa8697e357 to your computer and use it in GitHub Desktop.
Save froi/bb0e42e5c17b0e52286bb6aa8697e357 to your computer and use it in GitHub Desktop.
Testing Roadie's coverage API
#!/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