Skip to content

okkez/coveralls-lcov

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

76 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Coveralls::Lcov

Upload coverage information generated by LCOV to coveralls.io.

coveralls-lcov supports travis-ci.org and travis-ci.com (via the --service-name switch).

Installation

Add this line to your application's Gemfile:

gem 'coveralls-lcov'

And then execute:

$ bundle

Or install it yourself as:

$ gem install coveralls-lcov

Alternatively if you want to install your own build of coveralls-lcov system-wide (one-step installation):

$ sudo rake install

Usage

In .travis.yml

Do not use sudo when install Gem because sudo doesn't refer PATH changed by RVM.

install:
  - sudo apt-get install -y lcov
  - gem install coveralls-lcov
before_script:
  - ./autogen.sh
  - ./configure --enable-coverage
script:
  - make check
after_success:
  - lcov --compat-libtool --directory . --capture --output-file coverage.info
  - coveralls-lcov coverage.info

or by hand

$ coveralls-lcov --repo-token "YOUR TOKEN" coverage.info

you can also put the token into the config file .coveralls.yml like this

repo_token: abcd....

and then execute

$ coveralls-lcov coverage.info

C1 coverage support

You can report C1 coverage using --rc lcov_branch_coverage=1.

after_success:
  - lcov --compat-libtool --directory . --capture --rc lcov_branch_coverage=1 --output-file coverage.info 
  - coveralls-lcov coverage.info

See also lcovrc(5).

Available command line flags

Flag Description
-t --repo-token=TOKEN The secret token for your repository, found at the bottom of your repository’s page on Coveralls.
-s --service_name=SERVICE The CI service or other environment in which the test suite was run. This can be anything, but certain services have special features (travis-ci, travis-pro, or coveralls-ruby).
--service-job-id=JOB_ID A unique identifier of the job on the service specified by service_name.
-b --branch=BRANCH The current Git branch to be reported to Coveralls (not needed for Travis or if git rev-parse properly reports the branch).
--service-pull-request=PULL_REQUEST The associated pull request ID of the build. Used for updating the status and/or commenting.
--flag-name=FLAG_NAME If this is set, the job being reported will be named in the view and have it’s own independent status reported to your VCS provider.
--retry=N Retries sending coverage data on failure to Coveralls N times (default: 3)
--delay=N Delays the next retry by N seconds (default: 3)
--source-encoding=ENCODING The encoding of the source file (default: UTF-8)
-v --verbose Prints debug information like the HTTP request payload.
-n --dry-run Converts coverage data and optionally prints coverage data in verbose mode, but does not send it to Coveralls.
-h --host=HOST Host of Coveralls endpoint (default: coveralls.io)
-p --port=PORT Post of Coveralls endpoint (default: 443)
--[no]ssl Use SSL for connecting to Coveralls (default)

Contributing

  1. Fork it ( http://github.com/okkez/coveralls-lcov/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

lcov support for coveralls.io

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages