diff --git a/script/coverage-json-to-cobertura b/script/coverage-json-to-cobertura index 2315f920..ec0f9e7b 100755 --- a/script/coverage-json-to-cobertura +++ b/script/coverage-json-to-cobertura @@ -68,6 +68,14 @@ files = } end) +source = + if System.get_env("CI_BUILDS_DIR") do + "#{System.get_env("CI_BUILDS_DIR")}/#{System.get_env("PROJECT_FULL_PATH")}" + else + File.cwd! + end + + buffer = XmlBuilder.document([ XmlBuilder.doctype( @@ -80,6 +88,17 @@ buffer = "line-rate" => ratio, }, [ + { + :sources, + %{}, + [ + { + :source, + %{}, + source + } + ] + }, { :packages, %{},