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

Running 'Test and Publish Code Coverage' returns a TypeError message #224

Closed
Fiyin-Anne opened this issue Sep 9, 2020 · 7 comments
Closed
Assignees
Labels
question Further information is requested

Comments

@Fiyin-Anne
Copy link

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 Fiyin-Anne added the bug Something isn't working label Sep 9, 2020
@paambaati
Copy link
Owner

paambaati commented Sep 22, 2020

@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.

@hitmands
Copy link

neither 2.7.0, nor 2.7.1 seem to execute the coverage command at all...

Screenshot 2020-09-28 at 14 36 50

@paambaati
Copy link
Owner

paambaati commented Oct 1, 2020

@hitmands I've just now pushed a new release - please try v2.7.3.

@paambaati paambaati added question Further information is requested and removed bug Something isn't working labels Oct 1, 2020
@tetienne
Copy link

tetienne commented Dec 7, 2020

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.

@paambaati
Copy link
Owner

@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

@tetienne
Copy link

@paambaati Here a PR with the modification: tetienne/somfy-open-api#67

@paambaati
Copy link
Owner

@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.

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

No branches or pull requests

4 participants