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

Error: Cannot convert undefined or null to object #83

Open
GaboFDC opened this issue Jan 27, 2021 · 4 comments
Open

Error: Cannot convert undefined or null to object #83

GaboFDC opened this issue Jan 27, 2021 · 4 comments

Comments

@GaboFDC
Copy link

GaboFDC commented Jan 27, 2021

I just setup the action but I'm getting the error:

image

Not sure whats the problem, I thought it may be because there is no diff at the moment, but I saw there is a test for that, so not sure where the error may be.

@steventux
Copy link

I think this is to do with not generating branch coverage using Simplecov, there seems to be an expectation that coverage.branches is an object here: https://github.com/kzkn/simplecov-resultset-diff-action/blob/main/src/simplecov.ts#L79

eg.

Simplecov.start 'rails' do
  enable_coverage :branch
end

Adding the above fixed this error for me.

@brunocalmels
Copy link

I'm facing the same issue. I added branch coverage but that did't solve the issue.

@instrumentl707
Copy link

@brunocalmels I have the same issue - did you manage to resolve it?

@jverce
Copy link

jverce commented Dec 6, 2022

The solution provided by @steventux worked for me, but only after pushing those changes to the base branch. Given that this action needs to measure the test coverage in both the head and the base Git branches, you need to have branch coverage in both Git branches.

In other words, make sure you have enable_coverage :branch in your base branch, and only then run this Github action in a pull request.

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

5 participants