Closed ndbroadbent closed 4 years ago
Ahhhh, yes it looks like my custom rspec command is causing problems.
When I run:
rspec <test_file>
I see the "Please provide the repository token" error for CodeCov.
But when I run:
bundle exec rspec --format RspecJunitFormatter --out rspec.xml --format documentation --require /builds/docspring/docspring/vendor/bundle/ruby/2.6.0/bundler/gems/test-boosters-2d7f7e615904/rspec_formatters/semaphore_rspec3_json_formatter.rb --format SemaphoreFormatter --out /tmp/rspec_report.json <test file>
I get no log output related to CodeCov.
UPDATE: Ohhh strange, I narrowed it down to the presence of bundle exec
.
rspec <test_file>
works, but bundle exec rspec <test_file>
doesn't work.
AHH, sorry this was my fault! I'm doing some tricky things with SimpleCov and Spring, and this broke the CodeCov integration on CI. I managed to figure out a fix for this.
Sorry to bother you!
I'm using GitLab CI. I set the
CODECOV_TOKEN
env variable, and I have these lines in myspec_helper.rb
:After my tests finish running, I don't see any reports getting uploaded to Codecov.
~I was under the impression that this Ruby library would replace the Bash uploader step, so I haven't used this line anywhere:
bash <(curl -s https://codecov.io/bash)
Do I also need the bash uploader when I'm using codecov-ruby?~ I ran the tests locally withoutCODECOV_TOKEN
, and saw this error:So I'm trying to figure out why this isn't working for my CI builds. I am 100% sure that
CODECOV_TOKEN
is being set properly, and also that this code is being called:I also can't see any log output in my tests. Is there a way to increase the logging level so I can spot any problems?
More information:
I'm using
rspec_booster
from test-boosters to split up my tests across 5 jobs. I run this command to start the tests:This ends up running the following
rspec
command:Will this cause problems with the SimpleCov.formatter?