Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge committed Jun 9, 2021
1 parent 0fef38b commit 906c54a
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,15 @@ jobs:
arch:
- x64
include:
- version: '1'
os: ubuntu-latest
arch: x86
- version: '1'
os: windows-latest
arch: x64
- version: '1'
os: macos-latest
arch: x64
- version: '1'
os: ubuntu-latest
arch: x86
- version: '1'
os: windows-latest
arch: x64
- version: '1'
os: macos-latest
arch: x64
steps:
- uses: actions/checkout@v2
- uses: julia-actions/setup-julia@v1
Expand Down
15 changes: 5 additions & 10 deletions src/coveralls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@ module Coveralls

export submit, submit_local

const CoverallsJsonDict = Dict{String, Union{String, Dict{String, <:Any}, Vector{<:Dict}, Vector{<:CoverageTools.CovCount}}}

#=
JSON structure for Coveralls
Accessed 2015/07/24:
Expand All @@ -44,11 +42,9 @@ module Coveralls
# Convert a FileCoverage instance to its Coveralls JSON representation
function to_json(fc::FileCoverage)
name = Sys.iswindows() ? replace(fc.filename, '\\' => '/') : fc.filename
result = CoverallsJsonDict()
result["name"] = name
result["source_digest"] = bytes2hex(digest(MD_MD5, fc.source, "secret"))
result["coverage"] = fc.coverage
return result
return Dict("name" => name,
"source_digest" => bytes2hex(digest(MD_MD5, fc.source, "secret")),
"coverage" => fc.coverage)
end

# Format the body argument to HTTP.post
Expand Down Expand Up @@ -79,8 +75,7 @@ module Coveralls
end

function prepare_request(fcs::Vector{FileCoverage}, local_env::Bool, git_info=query_git_info)
data = CoverallsJsonDict()
data["source_files"] = map(to_json, fcs)
data = Dict{String,Any}("source_files" => map(to_json, fcs))

if local_env
# Attempt to parse git info via git_info, unless the user explicitly disables it by setting git_info to nothing
Expand Down Expand Up @@ -190,7 +185,7 @@ module Coveralls
end
LibGit2.close(repo)

return CoverallsJsonDict(
return Dict(
"branch" => branch,
"remotes" => [
Dict(
Expand Down

0 comments on commit 906c54a

Please sign in to comment.