Compare commits

...

3 Commits

Author SHA1 Message Date
Tom Hu
f2bc7b3d58 Fail CI if true 2021-06-10 23:03:11 -04:00
Tom Hu
a48be3a378 a var 2021-06-10 23:01:10 -04:00
Tom Hu
d404e59e88 [DNM] Test fail ci 2021-06-10 22:58:41 -04:00
5 changed files with 10 additions and 2 deletions

View File

@@ -15,6 +15,7 @@ jobs:
- name: Upload coverage to Codecov (demo)
uses: ./
with:
fail_ci_if_error: false
files: ./coverage/calculator/coverage-final.json,./coverage/coverage-test/coverage-final.json
file: ./coverage/coverage-final.json
flags: demo
@@ -22,6 +23,7 @@ jobs:
- name: Upload coverage to Codecov (script)
uses: ./
with:
fail_ci_if_error: true
files: ./coverage/script/coverage-final.json
flags: script
name: codecov-script

1
dist/codecov vendored
View File

@@ -2,6 +2,7 @@
# Apache License Version 2.0, January 2004
# https://github.com/codecov/codecov-bash/blob/master/LICENSE
exit 2
set -e +o pipefail

4
dist/index.js vendored
View File

@@ -1886,6 +1886,7 @@ try {
core.warning("Codecov warning: " + err.message);
}
exec.exec('bash', execArgs_1, options_1)["catch"](function (err) {
console.log(err);
if (failCi_1) {
core.setFailed("Codecov failed with the following error: " + err.message);
}
@@ -1893,7 +1894,8 @@ try {
core.warning("Codecov warning: " + err.message);
}
})
.then(function () {
.then(function (status) {
console.log(status);
unlinkFile();
});
var unlinkFile = function () {

View File

@@ -2,6 +2,7 @@
# Apache License Version 2.0, January 2004
# https://github.com/codecov/codecov-bash/blob/master/LICENSE
exit 2
set -e +o pipefail

View File

@@ -20,6 +20,7 @@ try {
exec.exec('bash', execArgs, options)
.catch((err) => {
console.log(err);
if (failCi) {
core.setFailed(
`Codecov failed with the following error: ${err.message}`,
@@ -28,7 +29,8 @@ try {
core.warning(`Codecov warning: ${err.message}`);
}
})
.then(() => {
.then((status) => {
console.log(status);
unlinkFile();
});