Unable to run CI action to upload code coverage

I’ve modified the original CI file ( go-testing-ci.yml) to test the coverage only through the unittest but for some reason my steps for uploading the coverage file to codecov is being skipped. Can anybody help why this might be happening ?

link for the ci action : [Golang Unit and Integration Tests · ash-kamrip/meshery@abda22e · GitHub]

The CI is running successfully just that a particular unit test file isn’t generating the right out put , what’s the codecov report with the new changes you’ve made

hey @Philip-21 , what i’ve been trying to do is check why the code coverage report isn’t getting updated while several tests has been added to the packages like filter and config . Now I’ve figured out the reason for this , the step [Run coverage] in yml file is ending with errors, which doesnt let the further steps run i.e. [Upload Coverage to Codecov] in CI yml file.

I’ve had a successful run of the CI pipeline check it here ! . You can find the total coverage has increased for the forked meshery repo from 5 → 7 here. I haven’t added any new tests but only removed those which were failing/giving error. so In order to get updated coverage report we have to make all the test PASS.

Nice job @ash-kamrip the report seems to increase .
So it seems it did not cover tests files that generated outputs from the golden files but displayed test failed , I noticed the packages and files and folders in your codecov seem to reduce from the original one here. Well, the main focus is for our coverage to increase . and from this the lines of code covered increased from 919 to 1219
If that’s the case we have to find new ways of writing unit test for mesheryctl.

1 Like

@ash-kamrip from your the yml file in your branch, you need to replace your name with meshery in the if: github.repository field, so it will run smoothly when it gets merged .
Have you also created a pr for it ?

@Philip-21 when i was testing this initially, i removed the if clause altogether. so i can make the change now as you’ve suggested.

Before i create a PR for this I just wanted to confirm something , can we make the changes to the test so that they don’t fail ? Otherwise we would have to delete or comment out the tests. Let me ask this first in slack to get others suggestion

Well I feel making changes to the test will be the solution, because our target codecov mark is 80%.
We don’t need to comment out the tests for now. It seems the Changes you made only read the Test that Passed and this increased the coverage
Let’s just drop this proposal on slack so we can hear from fellow devs .