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

Ruby integration example #62

Closed
ShockwaveNN opened this issue Mar 12, 2020 · 11 comments
Closed

Ruby integration example #62

ShockwaveNN opened this issue Mar 12, 2020 · 11 comments

Comments

@ShockwaveNN
Copy link

So I trying to replace old codecov integration in my projects (which worked fine) with Github Actions integration

My ruby.yml file looks like this:

name: Ruby
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        ruby: [2.4, 2.5, 2.6, 2.7, head]
    steps:
    - uses: actions/checkout@v2
    - name: Set up Ruby ${{ matrix.ruby }}
      uses: ruby/setup-ruby@v1
      with:
        ruby-version: ${{ matrix.ruby }}
    - name: Build and test with Rake
      run: |
        gem install bundler
        bundle config set without 'development'
        bundle install --jobs 4 --retry 3
        bundle exec rake
    - name: Send test coverage report to codecov.io
      uses: codecov/codecov-action@v1
      with:
        file: ./coverage/.resultset.json

There is no error in logs:
image

But after a go to codecov here:
https://codecov.io/gh/ShockwaveNN/pocket-sinatra-interface/commits
All I see this error:
image

Can you point out that I'm doing wrong?

@ShockwaveNN
Copy link
Author

This is PR for this feature I'm trying to implement ShockwaveNN/pocket-sinatra-interface#68

@Drowze
Copy link

Drowze commented Jul 19, 2020

I've also ran into this issue. It seems that this action does not support simplecov 0.18. I had success using 0.17 instead:

See:
Drowze/aspirebudgeting_ruby@8ad0f06
https://github.com/Drowze/aspirebudgeting_ruby/runs/856078634

@thomasrockhu
Copy link
Contributor

@Drowze sorry for the delay here, can you point me to a build where 0.18 was breaking?

Drowze added a commit to Drowze/aspirebudgeting_ruby that referenced this issue Jul 30, 2020
@Drowze
Copy link

Drowze commented Jul 30, 2020

@thomasrockhu I was going to point you to this old build, but it seems that it got deleted (the branch it was in was rebased and push forced).
https://github.com/Drowze/aspirebudgeting_ruby/actions/runs/163053732

I used the same commit (with a dummy commit on top of it generate a new commit SHA) and pushed a new PR with it:
Drowze/aspirebudgeting_ruby#10
https://github.com/Drowze/aspirebudgeting_ruby/runs/926732365
https://codecov.io/github/Drowze/aspirebudgeting_ruby/commit/ee483b984effe2e08dbacc58131532b84bf19e56

Please let me know if I can help any further.

@thomasrockhu
Copy link
Contributor

Awesome, thanks @Drowze. We'll work on a fix for this.

@phosphene
Copy link

Thanks gents. I am also waiting on support for simplecov 0.18+ . I downgraded to 0.17.1 in the meantime and it works quite well.

@thomasrockhu
Copy link
Contributor

@phosphene @Drowze we made some changes on our side to support Simplecov 0.18+. Would you be able to see if this aligns with what you expect?

@pioz
Copy link

pioz commented Jan 27, 2021

@thomasrockhu I have the same problem with version 0.18.5 (last that support Ruby 2.4). Here my config:

- name: Upload coverage report to Codecov
        uses: codecov/codecov-action@v1
        with:
          file: ./coverage/.resultset.json

screnshot1
screnshot1
screnshot1

@thomasrockhu
Copy link
Contributor

@pioz you will need path fixing

Something like

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

Please check our community boards

@pboling
Copy link

pboling commented Oct 27, 2021

@thomasrockhu How would we configure the v2 action for Ruby?

@pboling
Copy link

pboling commented Oct 27, 2021

I've got it working here. It seems that every key is optional!
https://github.com/pboling/shiftable/blob/main/.github/workflows/test.yml#L49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants