Skip to content

Commit

Permalink
feat: add network params (#1365)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomasrockhu-codecov authored Apr 9, 2024
1 parent 640b86a commit 363a65a
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 1 deletion.
6 changes: 6 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ inputs:
name:
description: 'User defined upload name. Visible in Codecov UI'
required: false
network_filter:
description: 'Specify a filter on the files listed in the network section of the Codecov report. This will only add files whose path begin with the specified filter. Useful for upload-specific path fixing'
required: false
network_prefix:
description: 'Specify a prefix on files listed in the network section of the Codecov report. Useful to help resolve path fixing'
required: false
os:
description: 'Override the assumed OS. Options are linux | macos | windows.'
required: false
Expand Down
8 changes: 8 additions & 0 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -32713,6 +32713,8 @@ const buildUploadExec = () => buildExec_awaiter(void 0, void 0, void 0, function
const handleNoReportsFound = isTrue(core.getInput('handle_no_reports_found'));
const jobCode = core.getInput('job_code');
const name = core.getInput('name');
const networkFilter = core.getInput('network_filter');
const networkPrefix = core.getInput('network_prefix');
const os = core.getInput('os');
const overrideBranch = core.getInput('override_branch');
const overrideBuild = core.getInput('override_build');
Expand Down Expand Up @@ -32792,6 +32794,12 @@ const buildUploadExec = () => buildExec_awaiter(void 0, void 0, void 0, function
if (name) {
uploadExecArgs.push('-n', `${name}`);
}
if (networkFilter) {
uploadExecArgs.push('--network-filter', `${networkFilter}`);
}
if (networkPrefix) {
uploadExecArgs.push('--network-prefix', `${networkPrefix}`);
}
if (overrideBranch) {
uploadExecArgs.push('-B', `${overrideBranch}`);
}
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

6 changes: 6 additions & 0 deletions src/buildExec.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ test('upload args', async () => {
'override_build_url': 'https://example.com/build/2',
'override_commit': '9caabca5474b49de74ef5667deabaf74cdacc244',
'override_pr': '2',
'network_filter': 'subA/',
'network_prefix': 'forA/',
'plugin': 'xcode',
'plugins': 'pycoverage,compress-pycoverage',
'report_code': 'testCode',
Expand Down Expand Up @@ -130,6 +132,10 @@ test('upload args', async () => {
'32',
'-n',
'codecov',
'--network-filter',
'subA/',
'--network-prefix',
'forA/',
'-B',
'thomasrockhu/test',
'-b',
Expand Down
8 changes: 8 additions & 0 deletions src/buildExec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,8 @@ const buildUploadExec = async () => {
const handleNoReportsFound = isTrue(core.getInput('handle_no_reports_found'));
const jobCode = core.getInput('job_code');
const name = core.getInput('name');
const networkFilter = core.getInput('network_filter');
const networkPrefix = core.getInput('network_prefix');
const os = core.getInput('os');
const overrideBranch = core.getInput('override_branch');
const overrideBuild = core.getInput('override_build');
Expand Down Expand Up @@ -289,6 +291,12 @@ const buildUploadExec = async () => {
if (name) {
uploadExecArgs.push('-n', `${name}`);
}
if (networkFilter) {
uploadExecArgs.push('--network-filter', `${networkFilter}`);
}
if (networkPrefix) {
uploadExecArgs.push('--network-prefix', `${networkPrefix}`);
}
if (overrideBranch) {
uploadExecArgs.push('-B', `${overrideBranch}`);
}
Expand Down

0 comments on commit 363a65a

Please # to comment.