CI: Fix codecov upload
This commit is contained in:
parent
1609c23fea
commit
7f40dd8b5b
|
|
@ -100,4 +100,6 @@ jobs:
|
||||||
- name: Upload coverage data to Codecov
|
- name: Upload coverage data to Codecov
|
||||||
env:
|
env:
|
||||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||||
run: ( cd nodist/obj_dir/upload && ../../../ci/codecov -v do-upload -Z --sha ${{ github.sha }} -f ../../../nodist/obj_dir/coverage/app_total.info )
|
run: |
|
||||||
|
find . -name '*.gcno' -exec rm {} \;
|
||||||
|
./ci/codecov -v do-upload -Z --sha ${{ github.sha }} -f nodist/obj_dir/coverage/app_total.info
|
||||||
|
|
|
||||||
|
|
@ -181,14 +181,17 @@ def test():
|
||||||
ci_fold_start("upload")
|
ci_fold_start("upload")
|
||||||
print("Stage 18: Upload")
|
print("Stage 18: Upload")
|
||||||
# curl -Os https://cli.codecov.io/latest/linux/codecov ; sudo chmod +x codecov
|
# curl -Os https://cli.codecov.io/latest/linux/codecov ; sudo chmod +x codecov
|
||||||
# --disable-search does not seem to work, so we use a temp directory
|
# --disable-search does not seem to work
|
||||||
|
# -d with false directory does not seem to work
|
||||||
|
# So, remove gcno files before calling codecov
|
||||||
upload_dir = "nodist/obj_dir/upload"
|
upload_dir = "nodist/obj_dir/upload"
|
||||||
os.makedirs(upload_dir, exist_ok=True)
|
os.makedirs(upload_dir, exist_ok=True)
|
||||||
cmd = ("( cd " + upload_dir +
|
cmd = ("ci/codecov -v upload-process -Z" +
|
||||||
" && ../../../ci/codecov -v do-upload --fail-on-error" +
|
" -f " + cc_dir + "/app_total.info )")
|
||||||
" -f ../../../" + cc_dir + "/app_total.info )")
|
print("print: Not running:")
|
||||||
print("print: Not running: export CODECOV_TOKEN=<hidden>")
|
print(" export CODECOV_TOKEN=<hidden>")
|
||||||
print("print: Not running: " + cmd)
|
print(" find . -name '*.gcno' -exec rm {} \;")
|
||||||
|
print(" " + cmd)
|
||||||
ci_fold_end()
|
ci_fold_end()
|
||||||
|
|
||||||
if Args.stage_enabled[19]:
|
if Args.stage_enabled[19]:
|
||||||
|
|
|
||||||
|
|
@ -675,7 +675,7 @@ def distillLine(line_raw, lines, branches, include_exceptional_branches):
|
||||||
count = int(line_raw["count"])
|
count = int(line_raw["count"])
|
||||||
if count < 0:
|
if count < 0:
|
||||||
if "function_name" in line_raw:
|
if "function_name" in line_raw:
|
||||||
logging.warning("Ignoring negative count found in %s.", line_raw["function_name"])
|
logging.warning("Ignoring negative count found in '%s'.", line_raw["function_name"])
|
||||||
else:
|
else:
|
||||||
logging.warning("Ignoring negative count.")
|
logging.warning("Ignoring negative count.")
|
||||||
count = 0
|
count = 0
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue