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

feat: add network params #1365

Merged
merged 1 commit into from
Apr 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading