paambaati / codeclimate-action

GitHub Action to send your code coverage to CodeClimate
MIT License
202 stars 64 forks source link

feat(core): add support for batch-size #767

Closed rribeiro1 closed 3 months ago

rribeiro1 commented 3 months ago

This PR aims to support the batch-size parameter for the upload-coverage command. I started getting the following error this week, which I could only fix by changing this property using the CLI.

/home/runner/work/app/cc-reporter sum-coverage codeclimate.0.json -p 1 -o coverage.total.json
/home/runner/work/app/cc-reporter upload-coverage -i coverage.total.json
Error: invalid character '<' looking for beginning of value
time="2024-08-20T07:20:13Z" level=error msg="io: read/write on closed pipe" 
Usage:
  cc-test-reporter upload-coverage [flags]

Flags:
  -s, --batch-size int    batch size for source files (default 500)
  -e, --endpoint string   endpoint to upload coverage information to (default "https://api.codeclimate.com/v1/test_reports")
  -r, --id string         reporter identifier (default "xxx")
  -i, --input string      input path (default "coverage/codeclimate.json")
      --insecure          send coverage insecurely (without HTTPS)

Global Flags:
  -d, --debug   run in debug mode

Error: The process '/home/runner/work/app/cc-reporter' failed with exit code 255
/home/runner/work/_actions/paambaati/codeclimate-action/v8.0.0/node_modules/@actions/exec/lib/toolrunner.js:592
                error = new Error(`The process '${this.toolPath}' failed with exit code ${this.processExitCode}`);
                        ^

Node.js v20.13.1