mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-09 20:47:26 +00:00
fix: update tests
This commit is contained in:
parent
d2ccca2d60
commit
bdd438a538
4 changed files with 26 additions and 10 deletions
6
dist/index.js
vendored
6
dist/index.js
vendored
|
|
@ -32286,7 +32286,7 @@ const buildCommitExec = () => {
|
|||
if (commitParent) {
|
||||
commitExecArgs.push('--parent-sha', `${commitParent}`);
|
||||
}
|
||||
commitExecArgs.push(`--git-service ${gitService ? gitService : 'github'}`);
|
||||
commitExecArgs.push('--git-service', `${gitService ? gitService : 'github'}`);
|
||||
if (overrideBranch) {
|
||||
commitExecArgs.push('-B', `${overrideBranch}`);
|
||||
}
|
||||
|
|
@ -32352,7 +32352,7 @@ const buildReportExec = () => {
|
|||
if (token) {
|
||||
reportOptions.env.CODECOV_TOKEN = token;
|
||||
}
|
||||
reportExecArgs.push(`--git-service ${gitService ? gitService : 'github'}`);
|
||||
reportExecArgs.push('--git-service', `${gitService ? gitService : 'github'}`);
|
||||
if (overrideCommit) {
|
||||
reportExecArgs.push('-C', `${overrideCommit}`);
|
||||
}
|
||||
|
|
@ -32460,7 +32460,7 @@ const buildUploadExec = () => {
|
|||
uploadExecArgs.push('-F', `${f}`);
|
||||
});
|
||||
}
|
||||
uploadExecArgs.push(`--git-service ${gitService ? gitService : 'github'}`);
|
||||
uploadExecArgs.push('--git-service', `${gitService ? gitService : 'github'}`);
|
||||
if (handleNoReportsFound) {
|
||||
uploadExecArgs.push('--handle-no-reports-found');
|
||||
}
|
||||
|
|
|
|||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -38,7 +38,10 @@ test('general args', () => {
|
|||
|
||||
|
||||
test('upload args using context', () => {
|
||||
const expectedArgs = [];
|
||||
const expectedArgs = [
|
||||
'--git-service',
|
||||
'github',
|
||||
];
|
||||
const {uploadExecArgs, uploadCommand} = buildUploadExec();
|
||||
if (context.eventName == 'pull_request') {
|
||||
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||
|
|
@ -110,6 +113,8 @@ test('upload args', () => {
|
|||
'test',
|
||||
'-F',
|
||||
'test2',
|
||||
'--git-service',
|
||||
'github',
|
||||
'--handle-no-reports-found',
|
||||
'--job-code',
|
||||
'32',
|
||||
|
|
@ -165,6 +170,8 @@ test('report args', () => {
|
|||
const {reportExecArgs, reportCommand} = buildReportExec();
|
||||
|
||||
const expectedArgs = [
|
||||
'--git-service',
|
||||
'github',
|
||||
'-C',
|
||||
'9caabca5474b49de74ef5667deabaf74cdacc244',
|
||||
'-P',
|
||||
|
|
@ -189,7 +196,10 @@ test('report args using context', () => {
|
|||
for (const env of Object.keys(envs)) {
|
||||
process.env['INPUT_' + env.toUpperCase()] = envs[env];
|
||||
}
|
||||
const expectedArgs : string[] = [];
|
||||
const expectedArgs : string[] = [
|
||||
'--git-service',
|
||||
'github',
|
||||
];
|
||||
if (context.eventName == 'pull_request') {
|
||||
expectedArgs.push('-C', `${context.payload.pull_request.head.sha}`);
|
||||
}
|
||||
|
|
@ -206,6 +216,7 @@ test('report args using context', () => {
|
|||
|
||||
test('commit args', () => {
|
||||
const envs = {
|
||||
git_service: 'github_enterprise',
|
||||
commit_parent: '83231650328f11695dfb754ca0f540516f188d27',
|
||||
override_branch: 'thomasrockhu/test',
|
||||
override_commit: '9caabca5474b49de74ef5667deabaf74cdacc244',
|
||||
|
|
@ -222,6 +233,8 @@ test('commit args', () => {
|
|||
const expectedArgs = [
|
||||
'--parent-sha',
|
||||
'83231650328f11695dfb754ca0f540516f188d27',
|
||||
'--git-service',
|
||||
'github_enterprise',
|
||||
'-B',
|
||||
'thomasrockhu/test',
|
||||
'-C',
|
||||
|
|
@ -241,7 +254,10 @@ test('commit args', () => {
|
|||
});
|
||||
|
||||
test('commit args using context', () => {
|
||||
const expectedArgs :string[] = [];
|
||||
const expectedArgs :string[] = [
|
||||
'--git-service',
|
||||
'github',
|
||||
];
|
||||
|
||||
const {commitExecArgs, commitCommand} = buildCommitExec();
|
||||
if (context.eventName == 'pull_request') {
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ const buildCommitExec = () => {
|
|||
if (commitParent) {
|
||||
commitExecArgs.push('--parent-sha', `${commitParent}`);
|
||||
}
|
||||
commitExecArgs.push(`--git-service ${gitService ? gitService : 'github'}`);
|
||||
commitExecArgs.push('--git-service', `${gitService ? gitService : 'github'}`);
|
||||
|
||||
if (overrideBranch) {
|
||||
commitExecArgs.push('-B', `${overrideBranch}`);
|
||||
|
|
@ -128,7 +128,7 @@ const buildReportExec = () => {
|
|||
if (token) {
|
||||
reportOptions.env.CODECOV_TOKEN = token;
|
||||
}
|
||||
reportExecArgs.push(`--git-service ${gitService ? gitService : 'github'}`);
|
||||
reportExecArgs.push('--git-service', `${gitService ? gitService : 'github'}`);
|
||||
|
||||
if (overrideCommit) {
|
||||
reportExecArgs.push('-C', `${overrideCommit}`);
|
||||
|
|
@ -245,7 +245,7 @@ const buildUploadExec = () => {
|
|||
uploadExecArgs.push('-F', `${f}`);
|
||||
});
|
||||
}
|
||||
uploadExecArgs.push(`--git-service ${gitService ? gitService : 'github'}`);
|
||||
uploadExecArgs.push('--git-service', `${gitService ? gitService : 'github'}`);
|
||||
if (handleNoReportsFound) {
|
||||
uploadExecArgs.push('--handle-no-reports-found');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue