Skip to content
This repository was archived by the owner on Jan 10, 2023. It is now read-only.
This repository was archived by the owner on Jan 10, 2023. It is now read-only.

Provided token is not a UUID error with Gitlab CI #305

@kashyapm94

Description

@kashyapm94

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

enter image description here

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:

enter image description here

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions