mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-09 20:47:26 +00:00
changes based on review
This commit is contained in:
parent
5dc449765e
commit
b396576f86
6 changed files with 14 additions and 13 deletions
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
|
|
@ -8,7 +8,7 @@ jobs:
|
|||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Upload coverage to Codecov (script)
|
||||
uses: ./
|
||||
with:
|
||||
|
|
@ -43,7 +43,7 @@ jobs:
|
|||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
- name: Lint
|
||||
|
|
|
|||
8
dist/index.js
vendored
8
dist/index.js
vendored
|
|
@ -22333,7 +22333,7 @@ const getBaseUrl = (platform, version) => {
|
|||
return `https://cli.codecov.io/${version}/${platform}/${getUploaderName(platform)}`;
|
||||
};
|
||||
const getCommand = (filename, generalArgs, command) => {
|
||||
return filename + ' ' + generalArgs.join(' ') + ' ' + command;
|
||||
return [filename, ...generalArgs, command];
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -24637,14 +24637,14 @@ try {
|
|||
});
|
||||
};
|
||||
const doUpload = () => src_awaiter(void 0, void 0, void 0, function* () {
|
||||
yield exec.exec(getCommand(filename, args, uploadCommand), uploadExecArgs, uploadOptions)
|
||||
yield exec.exec(getCommand(filename, args, uploadCommand).join(" "), uploadExecArgs, uploadOptions)
|
||||
.catch((err) => {
|
||||
setFailure(`Codecov:
|
||||
Failed to properly upload report: ${err.message}`, failCi);
|
||||
});
|
||||
});
|
||||
const createReport = () => src_awaiter(void 0, void 0, void 0, function* () {
|
||||
yield exec.exec(getCommand(filename, args, reportCommand), reportExecArgs, reportOptions)
|
||||
yield exec.exec(getCommand(filename, args, reportCommand).join(" "), reportExecArgs, reportOptions)
|
||||
.then((exitCode) => src_awaiter(void 0, void 0, void 0, function* () {
|
||||
if (exitCode == 0) {
|
||||
yield doUpload();
|
||||
|
|
@ -24654,7 +24654,7 @@ try {
|
|||
Failed to properly create report: ${err.message}`, failCi);
|
||||
});
|
||||
});
|
||||
yield exec.exec(getCommand(filename, args, commitCommand), commitExecArgs, commitOptions)
|
||||
yield exec.exec(getCommand(filename, args, commitCommand).join(" "), commitExecArgs, commitOptions)
|
||||
.then((exitCode) => src_awaiter(void 0, void 0, void 0, function* () {
|
||||
if (exitCode == 0) {
|
||||
yield createReport();
|
||||
|
|
|
|||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
|
@ -70,5 +70,5 @@ test('isValidPlatform', () => {
|
|||
|
||||
test('getCommand', () => {
|
||||
expect(getCommand('path', ['-v', '-x'], 'do-upload'))
|
||||
.toEqual('path -v -x do-upload');
|
||||
.toEqual(['path', '-v', '-x', 'do-upload']);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -55,8 +55,8 @@ const getCommand = (
|
|||
filename: string,
|
||||
generalArgs:string[],
|
||||
command: string,
|
||||
): string => {
|
||||
return filename + ' ' + generalArgs.join(' ') + ' ' + command;
|
||||
): string[] => {
|
||||
return [filename, ...generalArgs, command];
|
||||
};
|
||||
|
||||
export {
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ try {
|
|||
});
|
||||
};
|
||||
const doUpload = async () => {
|
||||
await exec.exec(getCommand(filename, args, uploadCommand),
|
||||
await exec.exec(getCommand(filename, args, uploadCommand).join(' '),
|
||||
uploadExecArgs,
|
||||
uploadOptions)
|
||||
.catch((err) => {
|
||||
|
|
@ -80,7 +80,7 @@ try {
|
|||
};
|
||||
const createReport = async () => {
|
||||
await exec.exec(
|
||||
getCommand(filename, args, reportCommand),
|
||||
getCommand(filename, args, reportCommand).join(' '),
|
||||
reportExecArgs,
|
||||
reportOptions)
|
||||
.then(async (exitCode) => {
|
||||
|
|
@ -100,7 +100,8 @@ try {
|
|||
filename,
|
||||
args,
|
||||
commitCommand,
|
||||
), commitExecArgs, commitOptions)
|
||||
).join(' '),
|
||||
commitExecArgs, commitOptions)
|
||||
.then(async (exitCode) => {
|
||||
if (exitCode == 0) {
|
||||
await createReport();
|
||||
|
|
|
|||
Loading…
Reference in a new issue