mirror of
https://github.com/codecov/codecov-action.git
synced 2026-02-14 23:17:25 +00:00
execFile
This commit is contained in:
parent
112e1a0afd
commit
ef56160684
3 changed files with 14 additions and 15 deletions
2
.github/workflows/main.yml
vendored
2
.github/workflows/main.yml
vendored
|
|
@ -10,8 +10,6 @@ jobs:
|
||||||
run: npm install
|
run: npm install
|
||||||
- name: Lint
|
- name: Lint
|
||||||
run: npm run lint
|
run: npm run lint
|
||||||
- name: Run tests and collect coverage
|
|
||||||
run: npm run test
|
|
||||||
- name: Upload coverage to Codecov (demo)
|
- name: Upload coverage to Codecov (demo)
|
||||||
uses: ./
|
uses: ./
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
9
dist/index.js
vendored
9
dist/index.js
vendored
|
|
@ -33274,10 +33274,11 @@ try {
|
||||||
console.log('file does not exist');
|
console.log('file does not exist');
|
||||||
}
|
}
|
||||||
console.log(fs.statSync(filename_1));
|
console.log(fs.statSync(filename_1));
|
||||||
childProcess.execFile(filename_1)["catch"](function (err) {
|
childProcess.execFile(filename_1, function (err) {
|
||||||
core.setFailed("Codecov failed with the following error: " + err.message);
|
if (err) {
|
||||||
})
|
core.setFailed('Codecov: Failed to properly upload: ' +
|
||||||
.then(function () {
|
("" + err.message));
|
||||||
|
}
|
||||||
console.log('finished!');
|
console.log('finished!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
|
||||||
18
src/index.ts
18
src/index.ts
|
|
@ -28,15 +28,15 @@ try {
|
||||||
}
|
}
|
||||||
console.log(fs.statSync(filename));
|
console.log(fs.statSync(filename));
|
||||||
|
|
||||||
childProcess.execFile(filename)
|
childProcess.execFile(filename, (err) => {
|
||||||
.catch((err) => {
|
if (err) {
|
||||||
core.setFailed(
|
core.setFailed(
|
||||||
`Codecov failed with the following error: ${err.message}`,
|
'Codecov: Failed to properly upload: ' +
|
||||||
);
|
`${err.message}`,
|
||||||
})
|
);
|
||||||
.then(() => {
|
}
|
||||||
console.log('finished!');
|
console.log('finished!');
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.setFailed(
|
core.setFailed(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue