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

Using Coverage.jl with TravisCI #3

Closed
TeroFrondelius opened this issue May 19, 2015 · 7 comments
Closed

Using Coverage.jl with TravisCI #3

TeroFrondelius opened this issue May 19, 2015 · 7 comments
Assignees

Comments

@TeroFrondelius
Copy link
Member

See the https://github.com/IainNZ/Coverage.jl

Using Coverage.jl with Coveralls.io?

  1. Enable Coveralls.io for your repository. If it is public on GitHub and you are using using TravisCI, this is all you need to do. If this isn't the case, please submit an issue, and we can work on adding additional functionality for your use case.
  2. You must be using Julia 0.3 or higher, which added the --code-coverage command line argument.
  3. 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)'
  4. Add the following to the end of your .travis.yml file. This line downloads this package, collects the per-file coverage data, then bundles it up and submits to Coveralls. Coverage.jl assumes that the working directory is the package directory, so it changes to that first (so don't forget to replace MyPkg with your package's name!
after_success:
- julia -e 'cd(Pkg.dir("MyPkg")); Pkg.add("Coverage"); using Coverage; >Coveralls.submit(Coveralls.process_folder())'

If you make it through that, consider adding your package to the list below. Alternatively, if you get >stuck see on the examples below or checkout Coveralls troubleshooting page.

@ahojukka5
Copy link
Member

Any idea why the coverage reports stays unknown ...? Some projects are using PkgEval also, see https://github.com/IainNZ/PackageEvaluator.jl

@TeroFrondelius
Copy link
Member Author

@ahojukka5 I don't know. I have tried everything. I did get it working even for my empty generated package: https://github.com/TeroFrondelius/FooBar.jl

Here is a good list of badges for Python:
http://thomas-cokelaer.info/blog/2014/08/1013/

@TeroFrondelius
Copy link
Member Author

@ovainola please try to make this coverage to work.

@ovainola
Copy link
Contributor

ovainola commented Jun 7, 2015

@TeroFrondelius I located the problem. Seems that all the tests builded fine but when it was time to sent data to Coveralls.io, Coverage.jl crashed with greek symbols which were in the shape_functions.jl file. I deleted all the greek symbols and now it's working.

@ahojukka5
Copy link
Member

This might need another decision making. Should we avoid using non-ascii, i.e. utf-8 characters in our coding style? (Related to coding style guide.)

@TeroFrondelius
Copy link
Member Author

There seems to be a choice (at least for Python): http://nedbatchelder.com/code/coverage/

/CC @JuliaFEM/owners

@ahojukka5
Copy link
Member

Are we having some kind of situation. Coverage dropped to zero.

ahojukka5 added a commit that referenced this issue Oct 30, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants