codecov / codecov-ruby Goto Github PK
View Code? Open in Web Editor NEWRuby uploader for Codecov
Home Page: https://codecov.io
License: MIT License
Ruby uploader for Codecov
Home Page: https://codecov.io
License: MIT License
We will be deprecating all gems prior 0.2.0. We are moving away from the v1 uploaders, as they are causing a significant percentage of upload timeouts and connection errors. Please upgrade to 0.2.0+ before August 17, 2020 in order to prevent stoppage of service.
Code coverage transmission gets interfered with by HTTP mocking frameworks such as Webmock.
Delightfully, Coveralls have a workaround that can be used:
WebMock.disable_net_connect! allow: %w{codecov.io}
I feel it's probably something worth mentioning on the documentation, if only to save others the few minutes of Googling I did to find that workaround!
Say you have a monorepo with
/ (repo root)
├── rails
└── web
This breaks the codecov report because of missing rails/
and web/
prefixes in all paths. Path fixing only works for one subfolder because it's global (not per flag/test suite), and breaks all paths of the other.
We have found a workaround with
# rails/test/support/coverage.rb, required in test_helper.rb:
SimpleCov.start 'rails' do
# test file paths need to include `rails/...` for codecov
root File.expand_path('../../..', __dir__)
# .. but move the coverage reports back into `rails/test/coverage`
coverage_dir 'rails/coverage'
end
but that's rather cumbersome.
The issue is that this is not configurable:
Line 581 in e1b4e2f
Would you be open for a PR? If so, any preferred config API? Maybe simply like this?
CODECOV_ROOT=rails/
Sorry for hammering you guys! We just love codecov so much we want to use it everywhere! :)
Can this be properly clarified and consolidated? The difference is perceivable in projects like https://github.com/newrelic/papers which try and reconcile these different data points.
Hi, i got a flaky test on circleci, with this error:
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _\`|/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Ruby-0.2.11
==> Circle CI detected
==> Appending file network
==> Gzipping contents
==> Uploading reports
url: https://codecov.io
query: token=secret&flags=backend&package=ruby-0.2.11&service=circleci&build=XXXXX&job=X&slug=XXXXXXX&pr&branch=XXXXX&commit=XXXXXXX
-> Pinging Codecov
https://codecov.io/upload/v4?token=secret&flags=backend&package=ruby-0.2.11&service=circleci&build=XXXXX&job=X&slug=XXXXXXXXXX&pr&branch=XXXXXXXXXX&commit=XXXXXXXX
-> Uploading to
<head><title>504 Gateway Time-out</title></head>
Traceback (most recent call last):
11: from /home/circleci/livestorm/packages/backend/vendor/bundle/ruby/2.7.0/gems/simplecov-0.19.0/lib/simplecov/defaults.rb:27:in `block in <top (required)>'
10: from /home/circleci/livestorm/packages/backend/vendor/bundle/ruby/2.7.0/gems/simplecov-0.19.0/lib/simplecov.rb:179:in `at_exit_behavior'
9: from /home/circleci/livestorm/packages/backend/vendor/bundle/ruby/2.7.0/gems/simplecov-0.19.0/lib/simplecov.rb:189:in `run_exit_tasks!'
8: from /home/circleci/livestorm/packages/backend/vendor/bundle/ruby/2.7.0/gems/simplecov-0.19.0/lib/simplecov/configuration.rb:196:in `block in at_exit'
7: from /home/circleci/livestorm/packages/backend/vendor/bundle/ruby/2.7.0/gems/simplecov-0.19.0/lib/simplecov/result.rb:51:in `format!'
6: from /home/circleci/livestorm/packages/backend/vendor/bundle/ruby/2.7.0/gems/codecov-0.2.11/lib/codecov.rb:470:in `format'
5: from /home/circleci/livestorm/packages/backend/vendor/bundle/ruby/2.7.0/gems/codecov-0.2.11/lib/codecov.rb:372:in `upload_to_codecov'
4: from /home/circleci/livestorm/packages/backend/vendor/bundle/ruby/2.7.0/gems/codecov-0.2.11/lib/codecov.rb:406:in `upload_to_v4'
3: from /usr/local/lib/ruby/2.7.0/uri/common.rb:737:in `URI'
2: from /usr/local/lib/ruby/2.7.0/uri/common.rb:234:in `parse'
1: from /usr/local/lib/ruby/2.7.0/uri/rfc3986_parser.rb:73:in `parse'
/usr/local/lib/ruby/2.7.0/uri/rfc3986_parser.rb:67:in `split': bad URI(is not URI?): "<head><title>504 Gateway Time-out</title></head>\\r\\n" (URI::InvalidURIError)
Exited with code exit status 1
CircleCI received exit code 1
A timeout error, the retries system does not seem to work properly
it happens sometime, not all the time.
Any idea how to fix this?
Just wondering if we could get the changelog updated? I'm seeing version changes in the gem but cannot see the commits or changelog entries.
What is the purpose of this line in the library?
It is causing my repository to fail every pipeline with the message {"error": {"context": "slug", "reason": "slug must match pattern ^[\\w\\-\\.]{1,255}\\/[\\w\\-\\.]{1,255}$"}, "meta": {"status": 400}}
.
My project path is https://gitlab.com/big-southern-software/point-to-point/hub.git
The library's split method causes big-southern-software/point-to-point/hub
to be extracted, which does indeed fail the regular expression above that expects a single slash.
It seems as though this split
method was utilized with GitHub-style single-hierarchy projects in mind, whereas GitLab allows infinite grouping hierarchies.
Heyo,
this line only gives back correct info if your rails project is at the root of your github repo.
If the rails project is not at the root, then it might be better to use
`git rev-parse HEAD`.chomp
instead of
SimpleCov.root
dependabot submitted Homebrew/homebrew-bundle#765 and per test result in https://github.com/Homebrew/homebrew-bundle/pull/765/checks?check_run_id=956036259, it looks like c0db3b2 introduced a regression because of how it's pulling in the new version file.
An error occurred while loading ./spec/bundle/brew_dumper_spec.rb. - Did you mean?
rspec ./spec/bundle/whalebrew_dumper_spec.rb
rspec ./spec/bundle/brew_installer_spec.rb
rspec ./spec/bundle/brew_services_spec.rb
Failure/Error: require "codecov"
LoadError:
cannot load such file -- version
# ./spec/spec_helper.rb:39:in `require'
# ./spec/spec_helper.rb:39:in `<top (required)>'
# ./spec/bundle/brew_dumper_spec.rb:3:in `require'
Repeated for all of our specs.
When running your test suite parallelized across multiple process or even machines, it's possible for just one of those executions to fail. This should be considered as a global failure, but instead all the successful executions are correctly reported to codecov except for the failed one, resulting in an aberrant coverage report.
I understand this is difficult to accomplish due to the fact that the reporting is integrated as an rspec formatter directly, loosing control over all the executions. For this to work I assume a refactor should be done to separate the steps of collecting metrics and reporting, providing the user with granular control about when to execute the submission of data to codecov.
Today I started seeing errors from Codecov in my Travis CI build. (See attached.) There is no way to rescue the error. The codecov gem should rescue errors and output a warning, instead of causing the build to fail.
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
html, body, iframe { margin: 0; padding: 0; height: 100%; }
iframe { display: block; width: 100%; border: none; }
</style>
<title>Application Error</title>
</head>
<body>
<iframe src="https://d234q63orb21db.cloudfront.net/cd118a714294f80d079e8514f43792f519841d20/media/html/error.html">
<p>Application Error</p>
</iframe>
</body>
</html>
/home/travis/.rvm/gems/ruby-2.0.0-p598/gems/json-2.0.1/lib/json/common.rb:156:in `parse': 740: unexpected token at '<!DOCTYPE html> (JSON::ParserError)
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style type="text/css">
html, body, iframe { margin: 0; padding: 0; height: 100%; }
iframe { display: block; width: 100%; border: none; }
</style>
<title>Application Error</title>
</head>
<body>
<iframe src="https://d234q63orb21db.cloudfront.net/cd118a714294f80d079e8514f43792f519841d20/media/html/error.html">
<p>Application Error</p>
</iframe>
</body>
</html>'
from /home/travis/.rvm/gems/ruby-2.0.0-p598/gems/json-2.0.1/lib/json/common.rb:156:in `parse'
from /home/travis/.rvm/gems/ruby-2.0.0-p598/gems/codecov-0.1.5/lib/codecov.rb:220:in `format'
from /home/travis/.rvm/gems/ruby-2.0.0-p598/gems/simplecov-0.12.0/lib/simplecov/result.rb:47:in `format!'
from /home/travis/.rvm/gems/ruby-2.0.0-p598/gems/simplecov-0.12.0/lib/simplecov/configuration.rb:172:in `block in at_exit'
from /home/travis/.rvm/gems/ruby-2.0.0-p598/gems/simplecov-0.12.0/lib/simplecov/defaults.rb:67:in `call'
from /home/travis/.rvm/gems/ruby-2.0.0-p598/gems/simplecov-0.12.0/lib/simplecov/defaults.rb:67:in `block in <top (required)>'
Similar to codecov/codecov-node#298, I just want to verify that this gem was not affected by the recent security issue.
I'm getting somewhat frequently today errors like uri/common.rb:739:in 'URI': bad argument (expected URI object or URI string) (ArgumentError)
It looks the problem comes from here:
Line 413 in e1b4e2f
However, I was wondering if it is OK when codecov fails to cause the tests to fail? Is there an official way to prevent returning non-zero exit status when this happen?
I have a project that has been uploading Ruby/Rails coverage reports and is working as expected. Now I am trying to upload coverage reports from JavaScript tests in the same project as well. From codecov/codecov-node#87, it sounds like this should just work; however, I am still only seeing the Rails coverage report. For what it's worth, my coverage directory structure matches the structure in the previously referenced issue.
Is there something else that I need to do to instruct codecov to merge the coverage reports?
New gem version raises an error:
cannot load such file -- colorize
I see new colorize
gem was added. Dependency should be in gemspec
file, not in Gemfile
Hello,
We are using Codecov with codecov-ruby. Would it be possible to split the format job and the uploader job?
It would allow the team to trust more the codecov reports, particularly when the specs fail. Right now when they fail, an incomplete report is sent to codecov, and it displays an alarming message saying that the coverage is only 11%, which is false. Thus, people not totally invested into it tend to ignore the message, because they doubt its reliability.
Furthermore, it would allow Rails user to use codecov with more flexibility: use the bash command uploader in a separate job of the circle CI workflow for instance, after having run the specs. Send the report conditionally (for instance when spec fail, or put a SKIP_CODECOV
flag).
Thanks !
As clearly stated in the docs you do not need to provide an API token if you collect coverage from a Appveyor build using a a public repo on git. Works fine on Travis.
Failure/Error: require "codecov"
LoadError:
cannot load such file -- /app/vendor/bundle/ruby/2.6.0/gems/codecov-0.2.14/lib/codecov/version
# ./vendor/bundle/ruby/2.6.0/gems/codecov-0.2.14/lib/codecov.rb:9:in `require_relative'
# ./vendor/bundle/ruby/2.6.0/gems/codecov-0.2.14/lib/codecov.rb:9:in `<top (required)>'
I am getting this after running rspec:
{"url": "http://codecov.io/bitbucket/prodetotal/prodetotal? ref=182376c518e87447a8c73a91a8bae1526cc59c4c", "meta": {"status": 200, "request": "400cf6a4-1c95- 437e-a1ca-ef7d3dafc939"}, "uploaded": true, "queued": true, "message": "Coverage reports upload successfully"}
But still no report on the site. If I run the bash command manually I got:
Codecov
(version) 7749084
(url) https://codecov.io
==> No CI detected, using git for branch and commit sha.
==> find . -type f -name '*.gcno' -exec gcov {} +
==> Searching for coverage reports
**> Python coverage not found
**> No coverage report found.
Related to #5
Hello everyone,
i use codecov through github actions.
I wanted to run my github actions from inside a preconfigured docker image to speedup my workflow.
Without a docker container the coverage report worked. Here, i just downloaded my dependencies directly in github actions.
I also read https://docs.codecov.com/docs/testing-with-docker and included in my dockerfile ENV CI true
and i also tried adding additionally ENV GITHUB_ACTIONS true
.
Unfortunately, inside the docker container my action fails with
Run bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
/__w/_temp/f4148eab-0fa5-4819-80c5-5e2736d64dc9.sh: 1: Syntax error: "(" unexpected
Error: Process completed with exit code 2.
My codecov.yml
file:
ignore:
- "/usr"
- "test"
comment:
require_changes: true
My workflow file codecov.yml
file:
name: Ubuntu-GCC-Debug-CodeCov
on: [push]
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
Ubuntu-GCC-Debug-CodeCov:
runs-on: ubuntu-latest
container:
image: rath3t/ci-ubuntu-21-04
steps:
- uses: actions/checkout@v2
- name: Build
run: |
mkdir cmake-build-debug
cd cmake-build-debug
cmake ../ -DCMAKE_BUILD_TYPE=Debug -G "Unix Makefiles" -DCMAKE_C_COMPILER=gcc-11 -DCMAKE_CXX_COMPILER=g++-11 -DENABLE_TEST_COVERAGE=1
cmake --build . --parallel 9 --target IkarusTests
- name: Tests
working-directory: ./cmake-build-debug
run: ctest --output-on-failure --parallel 4 -C Debug
- name: collect code coverage
run: bash <(curl -s https://codecov.io/bash) || echo "Codecov did not collect coverage reports"
My DockerFile
of the container
FROM ubuntu:hirsute
ENV HOME /root
ENV DEBIAN_FRONTEND "noninteractive"
ENV GITHUB_ACTIONS true
ENV CI true
RUN apt-get update -y && apt-get upgrade -y && \
apt-get -y install \
build-essential \
libssl-dev \
git \
wget \
apt-utils \
software-properties-common \
gfortran \
gcc-11 \
g++-11 \
clang \
liblapack-dev \
libblas-dev \
libsuitesparse-dev \
libdune-common-dev \
libdune-geometry-dev \
libdune-grid-dev \
libspdlog-dev \
libbenchmark-dev \
libgtest-dev && \
cd /usr/src/googletest && \
cmake . && \
cmake --build . --target install && \
cd ~/ && \
git clone https://gitlab.com/libeigen/eigen.git && \
cd eigen && \
git checkout 3.4 && \
ls && \
mkdir build && \
cd build && \
cmake ../ && \
make install && \
ls && \
cd .. && \
ls && \
cd .. && \
ls && \
rm -r eigen && \
git clone https://github.com/alandefreitas/matplotplusplus.git && \
cd matplotplusplus && \
mkdir -p build && \
cd build && \
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_EXAMPLES=OFF -DBUILD_TESTS=OFF && \
cmake --build . --parallel 4 --config Release && \
cmake --install . && \
cd ../.. && \
rm -r matplotplusplus && \
apt-get auto-remove -y
CMD [ "/bin/bash" ]
WORKDIR $HOME
Do i need to install packages into the docker image to get this working?
We don't get coverage reports after updating to v0.1.19 (which starts using v2 API). It seems like uploading is OK but the coverage is never reported. Thanks.
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _\`|/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Ruby-0.1.19
==> Circle CI detected
==> Gzipping contents
==> Uploading reports
url: https://codecov.io
query: token=secret&flags&service=circleci&build=3107&job=0&slug=org%2Frepo&pr&branch=dependabot%2Fbundler%2Fcodecov-0.1.19&commit=896963cf4b95d4ed4cdf2b683af8389780486709
-> Uploading to Codecov
https://codecov.io//upload/v2?token=secret&flags&service=circleci&build=3107&job=0&slug=org%2Frepo&pr&branch=dependabot%2Fbundler%2Fcodecov-0.1.19&commit=896963cf4b95d4ed4cdf2b683af8389780486709
View reports at https://codecov.io/github/org/repo/commit/896963cf4b95d4ed4cdf2b683af8389780486709
The simplecov gem added support for displaying branch coverage for a while now.
It would be nice if codecov would do that too.
Codecov is ignoring our configuration of ignoring total coverage decreases under 1%, as can be seen in activeadmin/activeadmin#5588.
Ruby 3 is out and codecov-ruby is not compatible with it :
it fallbacks to codecov 0.2.12
:
Using codecov 0.2.12 (was 0.2.15)
- codecov (0.2.15)
- simplecov (>= 0.15, < 0.21)
+ codecov (0.2.12)
+ json
+ simplecov
Because of b8fad69#diff-04cb1f7276546201ae5ccb1c2165c2b6c9ed202c6e6d7dd4ea803e32386a7dc2
Hello! We recently upgraded the codecov ruby gem to 0.2.6 and we are getting the following error: split': bad URI(is not URI?): "Use v2 endpoint\n" (URI::InvalidURIError
.
In our case, the gem issues a request to .../upload/v4?token=se .......
and then we get the following error: /usr/local/rvm/rubies/ruby-2.6.5/lib/ruby/2.6.0/uri/rfc3986_parser.rb:67:in split': bad URI(is not URI?): "Use v2 endpoint\n" (URI::InvalidURIError)
. The exception appears to be happening at uri = URI.parse(url.chomp('/') + '/upload/v4')
.
Any ideas as to what may causing the issue?
When running CodeBuild via CodePipeline, the CI provider is not detected. Also, there's no git repository with CodePipeline as source provider in CodeBuild, so branch and commit detection fail too.
Lcov style coverage report generated for Minitest to /srv/coverage/lcov/lcov.info
80 | Coverage report generated for Minitest to /srv/coverage. 3407 / 5298 LOC (64.31%) covered.
81 |
82 | _____ _
83 | / ____\| \| \|
84 | \| \| ___ __\| \| ___ ___ _____ __
85 | \| \| / _ \ / _\`\|/ _ \/ __/ _ \ \ / /
86 | \| \|___\| (_) \| (_\| \| __/ (_\| (_) \ V /
87 | \_____\___/ \__,_\|\___\|\___\___/ \_/
88 | Ruby-0.2.15
89 | x> No CI provider detected.
90 | ==> Appending file network
91 | fatal: not a git repository (or any of the parent directories): .git
92 | fatal: not a git repository (or any of the parent directories): .git
93 | ==> Gzipping contents
94 | ==> Uploading reports
95 | url: https://codecov.io
96 | query: token=secret&flags=rails&package=ruby-0.2.15&branch=&commit=
97 | -> Pinging Codecov
98 | https://codecov.io/upload/v4?token=secret&flags=rails&package=ruby-0.2.15&branch=&commit=
99 |
100 | <!DOCTYPE html>
101 | <html lang="en">
102 | <head>
103 | <meta charset="utf-8">
104 | <meta http-equiv="X-UA-Compatible" content="IE=edge">
105 | <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
106 | <meta name="description" content="Code coverage done right. Highly integrated with GitHub, Bitbucket and GitLab.">
107 | <meta name="author" content="@codecov">
108 | <meta name="keywords" content="code, coverage, analysis, testing, development, qa, analyzer">
109
I have been using Codecov for a long time with Travis CI, but recently I needed to make a switch to GitHub Actions as my CI provider.
I initially noticed that in my RSpec builds, Codecov was reporting that no CI provider was detected and so no API key was detected. I added my project's API key to my workflow and tried building again. This is the error I got:
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _\`|/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Ruby-0.2.3
x> No CI provider detected.
==> Appending file network
==> Gzipping contents
==> Uploading reports
url: https://codecov.io
query: token=secret&flags&package=ruby-0.2.3&branch=master&commit=8fee707cb8c943a38d0e884b1d0c1590fb49a997
-> Pinging Codecov
https://codecov.io/upload/v4?token=secret&flags&package=ruby-0.2.3&branch=master&commit=8fee707cb8c943a38d0e884b1d0c1590fb49a997
Timeout or connection error uploading coverage reports to Codecov. Retrying...
execution expired
Timeout or connection error uploading coverage reports to Codecov. Retrying...
execution expired
Timeout or connection error uploading coverage reports to Codecov. Out of retries.
execution expired
For my Jest tests, I am using https://github.com/codecov/codecov-action which seems to work great. Does codecov-action also work for Ruby coverage reports? Can this gem be updated to support GitHub Actions natively like Travis CI?
The changelog doesn't say anything about 0.2.13 being restricted to older versions of simplecov, but according to Rubygems the dependency went from >= 0
for codecov 0.2.12 to '~> 0.18.0` for 0.2.13. As such, those of us on the latest simplecov can't update.
Is this an oversight, or is there a compatibility issue that's been discovered with newer simplecov?
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _\`|/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Ruby-0.6.0
==> GitHub Actions detected
==> Gzipping contents
==> Uploading reports
url: https://codecov.io
query: token=secret&flags&package=ruby-0.6.0&service=github-actions&branch=fix%2Fmake-coverage-optional&pr=master&slug=tianhaoz95%2Ffastlane-plugin-flutter_version&build=1401940721&commit=30dd7cf8825a1a208c939f24b4839b3b80dba6b6
-> Pinging Codecov
https://codecov.io/upload/v4?token=secret&flags&package=ruby-0.6.0&service=github-actions&branch=fix%2Fmake-coverage-optional&pr=master&slug=tianhaoz95%2Ffastlane-plugin-flutter_version&build=1401940721&commit=30dd7cf8825a1a208c939f24b4839b3b80dba6b6
/home/runner/work/fastlane-plugin-flutter_version/fastlane-plugin-flutter_version/vendor/bundle/ruby/2.7.0/gems/codecov-0.6.0/lib/codecov/uploader.rb:56:in `upload': Could not upload reports to Codecov (StandardError)
Invalid request parameters
from /home/runner/work/fastlane-plugin-flutter_version/fastlane-plugin-flutter_version/vendor/bundle/ruby/2.7.0/gems/codecov-0.6.0/lib/codecov.rb:15:in `format'
from /home/runner/work/fastlane-plugin-flutter_version/fastlane-plugin-flutter_version/vendor/bundle/ruby/2.7.0/gems/simplecov-0.21.2/lib/simplecov/result.rb:51:in `format!'
from /home/runner/work/fastlane-plugin-flutter_version/fastlane-plugin-flutter_version/vendor/bundle/ruby/2.7.0/gems/simplecov-0.21.2/lib/simplecov/configuration.rb:197:in `block in at_exit'
from /home/runner/work/fastlane-plugin-flutter_version/fastlane-plugin-flutter_version/vendor/bundle/ruby/2.7.0/gems/simplecov-0.21.2/lib/simplecov.rb:189:in `run_exit_tasks!'
from /home/runner/work/fastlane-plugin-flutter_version/fastlane-plugin-flutter_version/vendor/bundle/ruby/2.7.0/gems/simplecov-0.21.2/lib/simplecov.rb:179:in `at_exit_behavior'
from /home/runner/work/fastlane-plugin-flutter_version/fastlane-plugin-flutter_version/vendor/bundle/ruby/2.7.0/gems/simplecov-0.21.2/lib/simplecov/defaults.rb:30:in `block in <top (required)>'
/opt/hostedtoolcache/Ruby/2.7.4/x64/bin/ruby -I/home/runner/work/fastlane-plugin-flutter_version/fastlane-plugin-flutter_version/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/lib:/home/runner/work/fastlane-plugin-flutter_version/fastlane-plugin-flutter_version/vendor/bundle/ruby/2.7.0/gems/rspec-support-3.10.2/lib /home/runner/work/fastlane-plugin-flutter_version/fastlane-plugin-flutter_version/vendor/bundle/ruby/2.7.0/gems/rspec-core-3.10.1/exe/rspec --pattern spec/\*\*\{,/\*/\*\*\}/\*_spec.rb failed
Error: Process completed with exit code 1.
This happens around the time of 0.6.0, but reverting it didn't fix the issue, so I'm thinking if the paramter to the server has a breaking change?
See https://github.com/tianhaoz95/fastlane-plugin-flutter_version/runs/4054299473?check_suite_focus=true for the run and https://github.com/tianhaoz95/fastlane-plugin-flutter_version for source code
Heroku CI is in Beta right now. Sadly it does not test inside a git repo, so you have to parse their env variables: https://devcenter.heroku.com/articles/heroku-ci#environment-variables
Any possibilty to add support?
Ref: circleci-tools/circleci-cli#217
First of all, thank you for this awesome product 🙏
I'm using codecov for almost all of my repositories.
colorize
and codecov-ruby
.codecov-ruby 0.2.8
( #94 ) overwrites colorize methods.I think gems used as a library should not monkey-patch the Ruby classes,
except in case of getting permission from users or getting things known to them at least.
So, I think we should use simple methods instead of monkey-patching String
( or use Refinement
? But I don't think it's not worth using such a function for the colorize methods.
Formatter SimpleCov::Formatter::Codecov failed with NameError:
uninitialized constant SimpleCov::Formatter::Codecov::API_HOST
https://github.com/codecov/codecov-ruby/blob/master/lib/codecov.rb#L264
GitLab renamed some of their CI variables in GitLab Runner v9: https://docs.gitlab.com/ce/ci/variables/README.html#9-0-renaming
As a result, we get the following error at the end of our test suite:
Formatter SimpleCov::Formatter::Codecov failed with NoMethodError: undefined method `split' for nil:NilClass (/builds/usabilityhub/app/vendor/bundle/ruby/2.3.0/gems/codecov-0.1.10/lib/codecov.rb:181:in `format')
We're having issues where coverage reports are sometimes not uploaded in some of our test splits, making the coverage graphs unstable and unreliable. It almost always looks like a temporary network issue, or server issue, since the other test splits upload successfully.
Is it possible to make the upload retry n
times before giving up?
As per https://docs.codecov.io/docs/codecov-yaml#section-can-i-name-the-file-codecov-yml-
I tried to place my .codecov.yml
under .circleci/
i.e. .circleci/.codecov.yml
.
It didn't work for me :(
.circleci/codecov.yml
didn't work too. So I had to rename it into codecov.yml
which is working
Hi,
https://docs.codecov.io/docs/about-the-codecov-bash-uploader#arguments
When using the bash it would be something like this:
bash <(curl -s https://codecov.io/bash) -F flag1
How can I set the flags when using codecov-ruby?
Thanks.
We have started using https://knapsackpro.com/ with GitHub Actions and we run 14 jobs. We are using Queue Mode, along with split by individual tests (it) in certain situations.
I often have 1 job time out, though I've also seen multiple time out.
The last step of the GitHub Action is:
- name: Upload coverage results
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bin/rake codecov:upload
Hi there,
I recently had some issues getting Buildkite setup due to an initially mysterious issue that turned out to be pretty straightforward once I looked at the code - the codecov formatter expected an environment variable I had forgotten to forward.
In my case, it was BUILDKITE_JOB_ID
I forgot to forward to the Rails container, meaning nil
got concatenated with a string and resulting in:
/usr/local/bundle/gems/codecov-0.1.5/lib/codecov.rb:67:in `+': no implicit conversion of nil into String (TypeError)
from /usr/local/bundle/gems/codecov-0.1.5/lib/codecov.rb:67:in `format'
...
should there be some sort of pre-validation that the expected environment variables are present, along with a more helpful error message, or are you happy with the current situation which, while not obvious at first, is easy enough to debug once you look at the code?
I'd be happy to look into making this a bit more obvious, but would like to know that the effort is likely to be well received first.
I'm using GitLab CI. I set the CODECOV_TOKEN
env variable, and I have these lines in my spec_helper.rb
:
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
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: I ran the tests locally without bash <(curl -s https://codecov.io/bash)
Do I also need the bash uploader when I'm using codecov-ruby?CODECOV_TOKEN
, and saw this error:
{"meta": {"status": 400}, "error": {"reason": "Please provide the repository token to upload reports via `-t :repository-token`", "context": null}}
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:
require 'codecov'
SimpleCov.formatter = SimpleCov::Formatter::Codecov
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:
$ TEST_BOOSTERS_RSPEC_TEST_EXCLUDE_PATTERN="spec/api/**"
TB_RSPEC_OPTIONS='--format RspecJunitFormatter --out rspec.xml'
rspec_booster --job $CI_NODE_INDEX/$CI_NODE_TOTAL
This ends up running the following rspec
command:
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 /root/rspec_report.json <test files>
Will this cause problems with the SimpleCov.formatter?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.