JuliaCI / Coverage.jl

Compare d762754 ... +1 ... c0abb4b

Coverage Reach
coveralls.jl codecovio.jl

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 7 files from the diff.
Other files ignored by Codecov

@@ -207,6 +207,8 @@
Loading
207 207
    values match the Codecov upload/v2 API specification.
208 208
    The `codecov_url` keyword argument or the CODECOV_URL environment variable
209 209
    can be used to specify the base path of the uri.
210 +
    The `codecov_url_path` keyword argument or the CODECOV_URL_PATH environment variable
211 +
    can be used to specify the final path of the uri.
210 212
    The `dry_run` keyword can be used to prevent the http request from
211 213
    being generated.
212 214
    """
@@ -222,18 +224,20 @@
Loading
222 224
        @debug "Codecov.io API URL:\n" * mask_token(uri_str)
223 225
224 226
        if !dry_run
225 -
            heads   = Dict("Content-Type" => "application/json",
226 -
                           "Accept" => "application/json")
227 +
            heads   = Dict("Content-Type" => "application/json")
227 228
            data    = to_json(fcs)
228 229
            req     = HTTP.post(uri_str; body = JSON.json(data), headers = heads)
229 -
            @debug "Result of submission:" * String(req)
230 +
            @debug "Result of submission:" * mask_token(String(req))
230 231
        end
231 232
    end
232 233
233 234
    function construct_uri_string(kwargs::Dict)
234 235
        url = get(ENV, "CODECOV_URL", "")
235 236
        isempty(url) || (kwargs = set_defaults(kwargs, codecov_url = url))
236 237
238 +
        path = get(ENV, "CODECOV_URL_PATH", "")
239 +
        isempty(path) || (kwargs = set_defaults(kwargs, codecov_url_path = path))
240 +
237 241
        token = get(ENV, "CODECOV_TOKEN", "")
238 242
        isempty(token) || (kwargs = set_defaults(kwargs, token = token))
239 243
@@ -244,15 +248,22 @@
Loading
244 248
        isempty(name) || (kwargs = set_defaults(kwargs; name = name))
245 249
246 250
        codecov_url = get(kwargs, :codecov_url, "https://codecov.io")
247 -
        codecov_url[end] == "/" && error("the codecov_url should not end with a /, given url $(repr(codecov_url))")
251 +
        if isempty(codecov_url) || codecov_url[end] == '/'
252 +
            error("the codecov_url should not end with a /, given url $(repr(codecov_url))")
253 +
        end
254 +
255 +
        codecov_url_path = get(kwargs, :codecov_url_path, "/upload/v2")
256 +
        if isempty(codecov_url_path) || codecov_url_path[1] != '/' || codecov_url_path[end] == '/'
257 +
            error("the codecov_url_path should begin with, but not end with, a /, given url $(repr(codecov_url_path))")
258 +
        end
248 259
249 -
        uri_str = "$(codecov_url)/upload/v2?"
260 +
        uri_str = "$(codecov_url)$(codecov_url_path)?"
250 261
        for (k, v) in kwargs
251 262
            # add all except a few special key/value pairs to the URL
252 263
            # (:verbose is there for backwards compatibility with versions
253 264
            # of this code that treated it in a special way)
254 265
            if k != :codecov_url && k != :dry_run && k != :verbose
255 -
                uri_str = "$(uri_str)&$(k)=$(v)"
266 +
                uri_str = "$(uri_str)$(k)=$(v)&"
256 267
            end
257 268
        end
258 269

Learn more Showing 3 files with coverage changes found.

src/Coverage.jl
Loading file...
Changes in src/codecovio.jl
-7
+7
Loading file...
Changes in src/coveralls.jl
-9
+9
Loading file...
Files Coverage
src +7.62% 90.26%
Project Totals (2 files) 90.26%
Loading