Code Climate Coverage Failing

2.0
#1

Hey guys could you please help me out with this? I am stuck. :confused:

My project is on github if you need more details.

.circleci/config.yml: https://github.com/developer239/localized-graphql-koa-typescript/blob/master/.circleci/config.yml

I feel like this has something to do with my jest command: node_modules/.bin/jest -i --forceExit --detectOpenHandles

I have basically the same setup here: https://github.com/developer239/react-apollo-graphql/blob/master/.circleci/config.yml and it works fine. The only difference is that this is a backend project that has integration tests connected to the database.

I would really appreciate any help. :slight_smile:

#2

My favourite bit of advice here is that most problems are not CI problems. In other words, problems to do with running tests or linters or coverage reporters are best dealt with as if they were happening on your local machine. So, how would you deal with this problem on your local machine?

I’d try a few things. Firstly, it mentions that it needs a formatter. You’ve not provided any parameters to the command, so I assume it just uses this configuration file. I don’t see any formatters there either. What does the manual say here?

If you need to investigate this, you can go to a failed build in the CircleCI UI and “rebuild with SSH”, which will give you a real SSH console to log into. Using nano and running your Code Climate command again, you can modify, run and verify until you get the result you need, and then copy the working config back into your version-controlled code. Don’t forget to cancel the job afterwards, as this will eat your build minutes.

1 Like
#3

I was playing around with the stack and it looks like there is a different version or jest or jest typescript. I had to change a config:

Now it works. :slight_smile:

1 Like
closed #4

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.