CI: problem with codacy coverage reporter in circleci
sebastientourbier opened this issue · 0 comments
sebastientourbier commented
CircleCI fails at the codacy-coverage-reporter
job and so CMP3's continuous integration testing workflow does not succeed until the end such as in PR #66.
Error
#!/bin/bash -eo pipefail
export CODACY_REPORTER_VERSION=latest
export CODACY_PROJECT_TOKEN=${CODACY_PROJECT_TOKEN}
# comma separated list of report files
# reference from https://unix.stackexchange.com/a/191125
# plus https://stackoverflow.com/a/20323801/7898052
report_array=$(printf "/tmp/data/ds-sample/test/test-01_coverage.xml,/tmp/data/ds-sample/test/test-02_coverage.xml,/tmp/data/ds-sample/test/test-03_coverage.xml,/tmp/data/ds-sample/test/test-04_coverage.xml,/tmp/data/ds-sample/test/test-05_coverage.xml,/tmp/data/ds-sample/test/test-06_coverage.xml,/tmp/data/ds-sample/test/test-07_coverage.xml,/tmp/data/ds-sample/test/test-08_coverage.xml,/tmp/data/ds-sample/test/test-09_coverage.xml" | cut -d',' -f1)
params=''
for report in $report_array
do
if [ ! -z "$report" ]
then
params="$params -r $report"
fi
done
if false; then
skip_option="--skip"
else
skip_option=""
fi
if [ -x "$(which curl)" ]; then
curl -Ls https://coverage.codacy.com/get.sh > get.sh
elif [ -x "$(which wget)" ] ; then
wget -qO - https://coverage.codacy.com/get.sh > get.sh
else
printf "Could not find curl or wget, please install one."
fi
source get.sh report $params --partial $skip_option &&\
source get.sh final $skip_option
______ __
/ ____/___ ____/ /___ ________ __
/ / / __ \/ __ / __ `/ ___/ / / /
/ /___/ /_/ / /_/ / /_/ / /__/ /_/ /
\____/\____/\__,_/\__,_/\___/\__, /
/____/
Codacy Coverage Reporter
--> Downloading the codacy reporter codacy-coverage-reporter-linux... (latest)
##O#- #
/home/circleci/.cache/codacy/coverage-reporter/latest/codacy-coverage-reporter: line 1: The: command not found
--> Failed!
Exited with code exit status 1
CircleCI received exit code 1
Solution
After contacting codacy support, this is due to an error and their side and will be fix soon.
For full transparency, here is their answer and a temporary fix:
Hi Sébastien,
Thank you for reaching out!
We have spotted what was causing this behaviour and we are already working on correcting it. In the meantime, as a workaround you can set as an orb parameter:
tool_version: ''
I will let you know as soon as this is fixed.
Regards,
Madalena