Running 'Test and Publish Code Coverage' returns a TypeError message
Describe the bug I am trying to send the test report to code-climate. After running the job, it says the step passed but on opening it, it only contains error messages.
(node:7164) UnhandledPromiseRejectionWarning: TypeError: (s || "").replace is not a function at escapeData (D:\a\_actions\paambaati\codeclimate-action\v2.5.6\node_modules\@actions\core\lib\command.js:66:10) at Command.toString (D:\a\_actions\paambaati\codeclimate-action\v2.5.6\node_modules\@actions\core\lib\command.js:60:35) at issueCommand (D:\a\_actions\paambaati\codeclimate-action\v2.5.6\node_modules\@actions\core\lib\command.js:23:30) at Object.issue (D:\a\_actions\paambaati\codeclimate-action\v2.5.6\node_modules\@actions\core\lib\command.js:27:5) at Object.error (D:\a\_actions\paambaati\codeclimate-action\v2.5.6\node_modules\@actions\core\lib\core.js:127:15) at D:\a\_actions\paambaati\codeclimate-action\v2.5.6\lib\main.js:85:20 at Generator.throw (<anonymous>) at rejected (D:\a\_actions\paambaati\codeclimate-action\v2.5.6\lib\main.js:6:65) (node:7164) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:7164) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
I also get the same result after using the v2.6.0 and v2.5.7 versions.
Version of codeclimate-action you're using
v2.5.6
Example links Github action
Expected behavior It should run successfully and send the test report to Code climate.
@Fiyin-Anne Can you try this out with the latest ~v2.7.0~ v2.7.2 version? It has better reporting and should help you pinpoint the issue.
neither 2.7.0, nor 2.7.1 seem to execute the coverage command at all...
@hitmands I've just now pushed a new release - please try v2.7.3.
Sorry to up this issue, but I have exactly the same behavior: https://github.com/tetienne/somfy-open-api/runs/1510838988 I'm using v2.7.4. The report is not uploaded to CodeClimate.
@tetienne I noticed that the error in your workflow run logs is slightly different from the one reported in this issue.
To help debug your issue, can you make this change and rerun your workflow?
with:
- coverageLocations: coverage.xml
+ coverageLocations: |
+ coverage.xml
@paambaati Here a PR with the modification: https://github.com/tetienne/somfy-open-api/pull/67
@tetienne The changes need to be merged before the action itself can kick in. In the run you linked, the CI ran with whatever's in your master; it needs to be merged first.