Description
I’m using the bash uploader on appveyor to upload coverage reports in cobertura format and although it seems to succeed it returns an error code making the CI job fail
Repository
CI/CD
Appveyor: AppVeyor
Uploader
Bash upload form within a PowerShell
Commit SHAs
49ee87bc7abe98503dcccb79a1f9af7b56e6eb4e
Codecov YAML
codecov:
max_report_age: off
require_ci_to_pass: yes
notify:
after_n_builds: 2
wait_for_ci: yes
comment:
layout: "diff, files"
ignore:
- "test/test.hpp"
Codecov Output
_____ _
/ ____| | |
| | ___ __| | ___ ___ _____ __
| | / _ \ / _` |/ _ \/ __/ _ \ \ / /
| |___| (_) | (_| | __/ (_| (_) \ V /
\_____\___/ \__,_|\___|\___\___/ \_/
Bash-20200629-ffaf297
==> Appveyor CI detected.
project root: C:/projects/nowide-fr98b
Fixing merge commit SHA
Yaml found at: codecov.yml
-> Found 1 reports
==> Detecting git/mercurial file structure
==> Appending build variables
+ APPVEYOR_BUILD_WORKER_IMAGE
==> Reading reports
+ cobertura.xml bytes=321895
==> Appending adjustments
https://docs.codecov.io/docs/fixing-reports
+ Found adjustments
==> Gzipping contents
==> Uploading reports
url: https://codecov.io
query: branch=develop&commit=49ee87bc7abe98503dcccb79a1f9af7b56e6eb4e&build=5s7ksf6mbytxsykk&build_url=https%3A%2F%2Fci.appveyor.com%2Fproject%2Fboostorg%2Fnowide%2Fbuilds%2F33854089%2Fjob%2F5s7ksf6mbytxsykk&name=Appveyor&tag=&slug=boostorg%2Fnowide&service=appveyor&flags=&pr=110&job=Flamefire%2Fnowide-fr98b%2F1.0.600-develop
-> Pinging Codecov
https://codecov.io/upload/v4?package=bash-20200629-ffaf297&token=secret&branch=develop&commit=49ee87bc7abe98503dcccb79a1f9af7b56e6eb4e&build=5s7ksf6mbytxsykk&build_url=https%3A%2F%2Fci.appveyor.com%2Fproject%2Fboostorg%2Fnowide%2Fbuilds%2F33854089%2Fjob%2F5s7ksf6mbytxsykk&name=Appveyor&tag=&slug=boostorg%2Fnowide&service=appveyor&flags=&pr=110&job=Flamefire%2Fnowide-fr98b%2F1.0.600-develop
-> Uploading to
https://storage.googleapis.com/codecov/v4/raw/2020-07-01/8E1BADE9769E504B2F71449D36F4269F/49ee87bc7abe98503dcccb79a1f9af7b56e6eb4e/2766050e-dc71-4bfe-9357-31072e4985be.txt?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=GOOG1EQX6OZVJGHKK3633AAFGLBUCOOATRACRQRQF6HMSMLYUP6EAD6XSWAAY%2F20200701%2FUS%2Fs3%2Faws4_request&X-Amz-Date=20200701T183936Z&X-Amz-Expires=10&X-Amz-SignedHeaders=host&X-Amz-Signature=a48c7a273a98c0ac916efe20586b7a8689adde848b3e71285ae17449bee3a3e2
bash : % Total % Received % Xferd Average Speed Time Time Time Current
At line:7 char:3
+ bash codecov.sh -f cobertura.xml -n Appveyor -e APPVEYOR_BUILD_WORK ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: ( % Total % ... Time Current:String) [], RemoteException
+ FullyQualifiedErrorId : NativeCommandError
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0
100 12280 0 0 100 12280 0 50954 --:--:-- --:--:-- --:--:-- 50954
-> View reports at https://codecov.io/github/boostorg/nowide/commit/49ee87bc7abe98503dcccb79a1f9af7b56e6eb4e
Command executed with exception:
Steps to Reproduce
Using this code:
- ps: |
If ($env:COVERAGE -eq “true”) {
choco install opencppcoverage
Invoke-WebRequest -Uri ‘https://codecov.io/bash’ -OutFile codecov.sh
OpenCppCoverage.exe --quiet --export_type cobertura:cobertura.xml--sources ${env:APPVEYOR_BUILD_FOLDER} --modules "$PWD"
–cover_children --working_dir “$PWD” – ctest -C Debug
bash codecov.sh -f cobertura.xml -n Appveyor -e APPVEYOR_BUILD_WORKER_IMAGE -X gcov -X search -Z
}
Expected behavior: [What you expect to happen]
Return with zero exit code
Actual behavior: [What actually happens]
Unknown Exception
Flakiness? [Does this happen all the time or only sometimes?]
Started happing recently but seems to persist (restarted the failing job and it failed again) although only cpp code was changed.