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

Better documentation for Circle-CI configuration #552

Closed
PaulWoodIII opened this issue Jun 20, 2015 · 12 comments
Closed

Better documentation for Circle-CI configuration #552

PaulWoodIII opened this issue Jun 20, 2015 · 12 comments

Comments

@PaulWoodIII
Copy link

Coveralls should make a tutorial or add documentation on how to set up coveralls with circle-ci

@jbender
Copy link

jbender commented Jul 22, 2015

👍 You've probably solved it for yourself, but for anyone else who ends up on this issue we were able to solve this by adding the following to our circle.yml

machine:
  environment:
    COVERALLS_REPO_TOKEN: <<YOUR TOKEN>>
    COVERALLS_PARALLEL: true

notify:
  webhooks:
    - url: https://coveralls.io/webhook?repo_token=<<YOUR TOKEN>>

@wli
Copy link

wli commented Aug 14, 2015

If you're using rspec with rails, this is what worked for me. Add the coveralls and simplecov gems, add your repo token to .coveralls.yml, and change spec_helper.rb:

In .coveralls.yml:

repo_token: your_repo_token_here

At the top of spec/spec_helper.rb:

require 'simplecov'

# Check to see if we're inside a CI environment. If not, we don't want to override the default formatter.
if ENV['CI']
  require 'coveralls'
  SimpleCov.formatter = Coveralls::SimpleCov::Formatter
end

# The NO_COVERAGE clause is optional - Coveralls and CircleCI don't use it by default, but may be useful for you in other circumstances.
SimpleCov.start 'rails' unless ENV.key?('NO_COVERAGE')

I didn't need any changes to my circle.yml file.

@autobolt
Copy link

The documentation for setting up circleci is still lacking. I have been trying to get it working, but despite pushing to my repo, and adding the key to my circle ci environment variables, I still see:

[Coveralls] Outside the Travis environment, not sending data.

In the test output, and nothing ever gets to Coveralls.

@kenske
Copy link

kenske commented Jul 13, 2018

I think this got eventually updated for CircleCI 1.0, but the documentation doesn't help for 2.0.

@muryanto1
Copy link

I am also unable to get coveralls work with CircleCI 2.0.

@lifenautjoe
Copy link

Anyone has successfully integrated CircleCI and coveralls yet? 🤷‍♀️

@kenske
Copy link

kenske commented Oct 11, 2018

I did, but ended up moving to codecov because the coveralls reports took too long (sometimes hours)

@muryanto1
Copy link

coveralls is working for me with circleci 2.0.

  • add my repo to coveralls, get the "TOKEN" for that repo, and
  • add "COVERALLS_REPO_TOKEN" environment variable in Circleci setting for my project.
  • run "coverage xml" after running my tests with coverage on <-- I think this is needed.
  • run 'coveralls' in circleci

@lifenautjoe
Copy link

Hi all, thanks for the replies! @muryanto1 your answer worked! However I also found CodeClimate a better documented tool which I integrated easily and with code quality analysis included too.

Would recommend giving it a look :-)

@joelethan
Copy link

@lifenautjoe and @muryanto1 Could you please share how you set up the config.yml. I am abit stuck configuring circleCI with coveralls. Thank you.

@caleb15
Copy link

caleb15 commented Aug 6, 2020

I was able to get coveralls working with circleci using the coveralls-python python library and coveralls node library.

I did have a bug with running the python library in parallel so I had to do a workaround: TheKevJames/coveralls-python#233 (comment)

@stale
Copy link

stale bot commented Nov 7, 2021

This issue has been automatically marked for closure because it has not had recent activity. It will be closed if no further activity occurs. If your issue is still active please add a comment and we’ll review as soon as we can. Thank you for your contributions.

@stale stale bot closed this as completed Nov 14, 2021
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