Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions for coverage reporting using Pkg.test #236

Closed
marekdedic opened this issue Sep 26, 2019 · 5 comments · Fixed by #248
Closed

Add instructions for coverage reporting using Pkg.test #236

marekdedic opened this issue Sep 26, 2019 · 5 comments · Fixed by #248

Comments

@marekdedic
Copy link

Hi,
the current instructions in the readme say that you should run julia --code-coverage=user. While in some cases, this might be applicable, in the case of using Pkg.test(), this will not work - the coverage won't get reported. You need to use something like julia --project -e "using Pkg; Pkg.test(; coverage = true);"

I don't know whether to replace the instructions or just add this somehow. However, this way of turning coverage on is actually preferable - if you are using the Julia 1.2.0 test-only dependencies, the only way to invoke tests (AFAIK) is to use Pkg.test() - using include("test/runtests.jl") will not work.

@marekdedic
Copy link
Author

Related to #9

@DilumAluthge
Copy link
Member

I think that these instructions are already in the README, right?

For example, if you look at item 2 under https://github.com/JuliaCI/Coverage.jl/blob/master/README.md#tracking-coverage-with-codecovio, it says:

  1. Use the command line option when you run your tests:
  • Either with something like julia --code-coverage test/runtests.jl, or
  • with something like julia -e 'Pkg.test("MyPkg", coverage=true)'

@marekdedic
Copy link
Author

Ugh, I missed it down there...

I was talking about the instructions at the top of the readme...

Thanks,
Marek

@DilumAluthge
Copy link
Member

@marekdedic Does this seem better? #248

@marekdedic
Copy link
Author

Definitely, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants