I am trying to do code coverage for a flask app in Python and uploading it on the
codecov.io platform. I am trying to upload it directly via Gitlab CI, but it doesn’t happen. It keeps throwing the following error:
HTTP 400 Provided token is not a UUID.
I created an account on
codecov.io and connected it to my gitlab account and selected a repository to work with. I added the token as an environment variable in gitlab CI
My CI file is:
image: ubuntu:18.04 variables: CODECOV_TOKEN: $CODECOV_TOKEN stages: - coverage - deploy coverage: stage: coverage before_script: - apt-get -y update - apt-get -y install curl python3-pip python3.7 zip - python3.7 -m pip install --upgrade pip - python3.7 -V - pip3.7 install -r requirements.txt script: - coverage run -m pytest - coverage report -m after_script: - bash <(curl -s https://codecov.io/bash) -t $CODECOV_TOKEN
The error screenshot:
But, when I did
bash <(curl -s https://codecov.io/bash) -t <token> from the linux terminal, it was successfully uploaded.
What is the mistake that I am doing?