mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-10 13:07:25 +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]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Upload coverage to Codecov (script)
|
- name: Upload coverage to Codecov (script)
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
@ -43,7 +43,7 @@ jobs:
|
||||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Lint
|
- 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)}`;
|
return `https://cli.codecov.io/${version}/${platform}/${getUploaderName(platform)}`;
|
||||||
};
|
};
|
||||||
const getCommand = (filename, generalArgs, command) => {
|
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* () {
|
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) => {
|
.catch((err) => {
|
||||||
setFailure(`Codecov:
|
setFailure(`Codecov:
|
||||||
Failed to properly upload report: ${err.message}`, failCi);
|
Failed to properly upload report: ${err.message}`, failCi);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
const createReport = () => src_awaiter(void 0, void 0, void 0, function* () {
|
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* () {
|
.then((exitCode) => src_awaiter(void 0, void 0, void 0, function* () {
|
||||||
if (exitCode == 0) {
|
if (exitCode == 0) {
|
||||||
yield doUpload();
|
yield doUpload();
|
||||||
|
|
@ -24654,7 +24654,7 @@ try {
|
||||||
Failed to properly create report: ${err.message}`, failCi);
|
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* () {
|
.then((exitCode) => src_awaiter(void 0, void 0, void 0, function* () {
|
||||||
if (exitCode == 0) {
|
if (exitCode == 0) {
|
||||||
yield createReport();
|
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', () => {
|
test('getCommand', () => {
|
||||||
expect(getCommand('path', ['-v', '-x'], 'do-upload'))
|
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,
|
filename: string,
|
||||||
generalArgs:string[],
|
generalArgs:string[],
|
||||||
command: string,
|
command: string,
|
||||||
): string => {
|
): string[] => {
|
||||||
return filename + ' ' + generalArgs.join(' ') + ' ' + command;
|
return [filename, ...generalArgs, command];
|
||||||
};
|
};
|
||||||
|
|
||||||
export {
|
export {
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ try {
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
const doUpload = async () => {
|
const doUpload = async () => {
|
||||||
await exec.exec(getCommand(filename, args, uploadCommand),
|
await exec.exec(getCommand(filename, args, uploadCommand).join(' '),
|
||||||
uploadExecArgs,
|
uploadExecArgs,
|
||||||
uploadOptions)
|
uploadOptions)
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
@ -80,7 +80,7 @@ try {
|
||||||
};
|
};
|
||||||
const createReport = async () => {
|
const createReport = async () => {
|
||||||
await exec.exec(
|
await exec.exec(
|
||||||
getCommand(filename, args, reportCommand),
|
getCommand(filename, args, reportCommand).join(' '),
|
||||||
reportExecArgs,
|
reportExecArgs,
|
||||||
reportOptions)
|
reportOptions)
|
||||||
.then(async (exitCode) => {
|
.then(async (exitCode) => {
|
||||||
|
|
@ -100,7 +100,8 @@ try {
|
||||||
filename,
|
filename,
|
||||||
args,
|
args,
|
||||||
commitCommand,
|
commitCommand,
|
||||||
), commitExecArgs, commitOptions)
|
).join(' '),
|
||||||
|
commitExecArgs, commitOptions)
|
||||||
.then(async (exitCode) => {
|
.then(async (exitCode) => {
|
||||||
if (exitCode == 0) {
|
if (exitCode == 0) {
|
||||||
await createReport();
|
await createReport();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue