# How does coverage testing work on github?

**URL:** <https://discourse.julialang.org/t/how-does-coverage-testing-work-on-github/11210>\
**Category:** Internals & Design\
**Created:** [May 29, 2018, 1:45am UTC](https://discourse.julialang.org/t/how-does-coverage-testing-work-on-github/11210 "2018-05-29T01:45:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Stephen\_Vavasis](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/stephen_vavasis/32/3389_2.png) [@Stephen\_Vavasis](https://discourse.julialang.org/u/Stephen_Vavasis)\
**Post date:** [May 29, 2018, 1:45am UTC](https://discourse.julialang.org/t/how-does-coverage-testing-work-on-github/11210/1 "2018-05-29T01:45:51Z")

</div>

A pull-request I posted on Github is showing unexpectedly low code coverage from the CI tool, and I’d like to check it locally. Could someone explain how Github’s coverage tool works? Is it based on Coverage.jl? Does it run the coverage checker in 0.6 or 0.7? If my code has a top-level construct of the form:

```julia
if VERSION >= v"0.7.0-DEV"
    <definitions>
else
    <different definitions>
end

```

is there a way to make sure both branches undergo coverage testing?

---

<div class="post-metadata">

**Author:** ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)\
**Post date:** [May 29, 2018, 5:42am UTC](https://discourse.julialang.org/t/how-does-coverage-testing-work-on-github/11210/2 "2018-05-29T05:42:13Z")

</div>

> [@Stephen\_Vavasis](#):
>
> unexpectedly low code coverage from the CI tool, and I’d like to check it locally

> **[GitHub - JuliaCI/LocalCoverage.jl: Trivial functions for working with...](https://github.com/JuliaCI/LocalCoverage.jl)**
>
> Trivial functions for working with coverage for packages locally. - GitHub - JuliaCI/LocalCoverage.jl: Trivial functions for working with coverage for packages locally.

---

<div class="post-metadata">

**Author:** ![rdeits](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/rdeits/32/286_2.png) [@rdeits](https://discourse.julialang.org/u/rdeits)\
**Post date:** [May 29, 2018, 2:37pm UTC](https://discourse.julialang.org/t/how-does-coverage-testing-work-on-github/11210/3 "2018-05-29T14:37:30Z")

</div>

With the default Travis-CI configuration for Julia (generated by `PkgDev.generate()`), coverage results are uploaded using `Coverage.jl` like this: [https://github.com/rdeits/WebIO.jl/blob/11389b75f0631d01dc3bcc924d8facc0e253309a/.travis.yml#L20-L24](https://github.com/rdeits/WebIO.jl/blob/11389b75f0631d01dc3bcc924d8facc0e253309a/.travis.yml#L20-L24)
