@@ -38,6 +38,8 @@ export interface ActionArguments {
38
38
verifyDownload ?: string ;
39
39
/** Verifies if the current OS and CPU architecture is supported by CodeClimate test reporter. */
40
40
verifyEnvironment ?: string ;
41
+ /** Batch size for source files used by upload-coverage command (default 500) */
42
+ batchSize ?: number ;
41
43
}
42
44
43
45
const CURRENT_ENVIRONMENT = getSupportedEnvironmentInfo ( ) ;
@@ -59,6 +61,7 @@ const DEFAULT_CODECLIMATE_DEBUG = 'false';
59
61
const DEFAULT_COVERAGE_LOCATIONS = '' ;
60
62
const DEFAULT_VERIFY_DOWNLOAD = 'true' ;
61
63
const DEFAULT_VERIFY_ENVIRONMENT = 'true' ;
64
+ const DEFAULT_BATCH_SIZE = 500 ;
62
65
63
66
const SUPPORTED_GITHUB_EVENTS = [
64
67
// Regular PRs.
@@ -206,6 +209,7 @@ export async function run({
206
209
workingDirectory = DEFAULT_WORKING_DIRECTORY ,
207
210
codeClimateDebug = DEFAULT_CODECLIMATE_DEBUG ,
208
211
coverageLocationsParam = DEFAULT_COVERAGE_LOCATIONS ,
212
+ batchSize = DEFAULT_BATCH_SIZE ,
209
213
coveragePrefix,
210
214
verifyDownload = DEFAULT_VERIFY_DOWNLOAD ,
211
215
verifyEnvironment = DEFAULT_VERIFY_ENVIRONMENT ,
@@ -368,6 +372,9 @@ export async function run({
368
372
// Upload to Code Climate.
369
373
const uploadCommands = [ 'upload-coverage' , '-i' , 'coverage.total.json' ] ;
370
374
if ( codeClimateDebug === 'true' ) uploadCommands . push ( '--debug' ) ;
375
+ if ( batchSize ) {
376
+ uploadCommands . push ( '--batch-size' , batchSize . toString ( ) ) ;
377
+ }
371
378
try {
372
379
lastExitCode = await exec ( executable , uploadCommands , execOpts ) ;
373
380
if ( lastExitCode !== 0 ) {
0 commit comments