There was an error processing coverage reports via Github Actions

I’m trying to upload coverage report to codecov via github actions.
Here my github action:

- name: Run tests
  run: bundle exec rake test
- name: Upload coverage report to Codecov
  uses: codecov/codecov-action@v1
  with:
    file: ./coverage/.resultset.json

I have a codecov.yml file in the root of my project like this:

fixes:
  - '/home/runner/work/chess/chess/::'

The report seems to be uploaded correctly to Codecov but when I open the Codecov report page I see the message “There was an error processing coverage reports.”

I attach here some screenshots:

Any idea to solve this?

1 Like

@pioz, can you please link to the PR and Codecov link?

Here the codecov link Code coverage done right.

I’ve no PR cause is a direct push on master:

@pioz, I’m not seeing a codecov.yml file

Change: Use simplecov, support from Ruby 2.5 · pioz/chess@baa3986 · GitHub
Current master: GitHub - pioz/chess: A fast chess library that use bitboards to play chess with Ruby

Did I miss something here?

Oh, yes… I have removed because it had no effect.

Can you link to the commit with the file?

I dont think is a problem with the paths. Here complete log of the action:

==> git version 2.30.0 found
==> curl 7.68.0 (x86_64-pc-linux-gnu) libcurl/7.68.0 OpenSSL/1.1.1f zlib/1.2.11 brotli/1.0.7 libidn2/2.2.0 libpsl/0.21.0 (+libidn2/2.2.0) libssh/0.9.3/openssl/zlib nghttp2/1.40.0 librtmp/2.3
Release-Date: 2020-01-08
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS brotli GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL TLS-SRP UnixSockets
==> GitHub Actions detected.
    project root: .
    Yaml not found, that's ok! Learn more at http://docs.codecov.io/docs/codecov-yaml
    -> Found 1 reports
==> Detecting git/mercurial file structure
==> Reading reports
    + ./coverage/.resultset.json bytes=12893
==> Appending adjustments
    https://docs.codecov.io/docs/fixing-reports
    + Found adjustments
==> Gzipping contents
        8.0K	/tmp/codecov.72OlJZ.gz
==> Uploading reports
    url: https://codecov.io
    query: branch=master&commit=baa3986aaa95460d9614eef0f1c6dca6843cca2a&build=516440007&build_url=http%3A%2F%2Fgithub.com%2Fpioz%2Fchess%2Factions%2Fruns%2F516440007&name=&tag=&slug=pioz%2Fchess&service=github-actions&flags=&pr=&job=Ruby&cmd_args=n,F,Q,f
->  Pinging Codecov
https://codecov.io/upload/v4?package=github-action-20210115-cec3c92&token=secret&branch=master&commit=baa3986aaa95460d9614eef0f1c6dca6843cca2a&build=516440007&build_url=http%3A%2F%2Fgithub.com%2Fpioz%2Fchess%2Factions%2Fruns%2F516440007&name=&tag=&slug=pioz%2Fchess&service=github-actions&flags=&pr=&job=Ruby&cmd_args=n,F,Q,f
->  Uploading to
https://storage.googleapis.com/codecov/v4/raw/2021-01-27/98BFC3C23F672DE4BC9E4576851F92C1/baa3986aaa95460d9614eef0f1c6dca6843cca2a/d0e7ddb5-28eb-4da2-bc3a-082616f087d3.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20210127%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20210127T232025Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=266353e3fa6963091b78373e8429e0d4c4455f126f9ea54da1e41bc6bbd152d6
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100  5761    0     0  100  5761      0  27433 --:--:-- --:--:-- --:--:-- 27433
    -> View reports at https://codecov.io/github/pioz/chess/commit/baa3986aaa95460d9614eef0f1c6dca6843cca2a

As you can see the file was uploaded correctly.

Anyway, I’ve just added the file: Add codecov.yml · pioz/chess@8a76736 · GitHub

@pioz, it looks like it’s picking up resultset.json which is not really a stable file. Can you try using the Codecov Ruby formatter or the SimpleCov Cobertura formatter

I cannot use GitHub - codecov/codecov-ruby: Ruby uploader for Codecov cause when I run the test, it upload also the report, see Split formatter and uploader · Issue #32 · codecov/codecov-ruby · GitHub and it is a pity.

It works with SimpleCov Cobertura formatter.

But it would be great if codecov supported the default simplecov ./coverage/.resultset.json file! No need extra dependencies.

@pioz, hmm… the formatter has been split from the uploader. You can use Codecov::SimpleCov::Formatter.

The upload method is always called, I think.

@pioz, however, I see your point. We’ll work to remove more dependencies.

1 Like

@pioz, that’s SimpleCov::Formatter::Codecov, which continues to provide backwards compatibility. To see just the formatter, you can see us deploy it on the bash uploader and here.