Code coverage report generated using codemagci CI not showing any results after uplaod to codcov

Please search for similar issues before creating a ticket.
If you are using GitHub, have you tried adding the Codecov GitHub app?
All fields below are required.


Description of the issue

I am using codemagic as a CI tool to build and publish flutter app. I have integrated codcov for code coverage. I am able to generate code coverage report and upload it to codcov but still get error when I open up commit page in codcov. I implemented the above task using the following document (Codecov integration - Codemagic Docs). Based on the codcov page it says CI failed and upload is empty.


Please provide a link to the CI/CD run.

Codecov Output

Please provide the full output of running the uploader on your CI/CD. This will typically have the Codecov logo as ASCII.

[2022-05-17T07:16:52.191Z] ['info']
[2022-05-17T07:16:52.191Z] ['info'] Uploading...
[2022-05-17T07:16:52.405Z] ['info'] {"status":"success","resultURL":""}

Expected Results

Please provide what you expect to have happened (e.g. a file that has missing coverage on a particular line).

Actual Results

Please provide what actually happened.

Additional Information

Any additional information, configuration, or data that might be necessary to reproduce the issue.

@madanshah114 can you provide the CI configuration and the entire Codecov snippet?

Hi @tom

Here is the Ci snippet for codecov:

   - name: Coverage report

    script: |

      HOMEBREW_NO_AUTO_UPDATE=1 brew install lcov

      mkdir -p test-results

      flutter test --coverage --machine > test-results/flutter.json  

      cat test-results/flutter.json

      code_coverage=$(lcov --list $FCI_BUILD_DIR/coverage/ | sed -n "s/.*Total:|\(.*\)%.*/\1/p")

      echo "Code Coverage: ${code_coverage}% "

      if (( $(echo "$code_coverage < $CODE_COVERAGE_TARGET" | bc) )); then { echo "code coverage is less than expected" && exit 1; }; fi  

    test_report: test-results/flutter.json

  - name: uplaod code coverage report

    script: |


      curl -Os  

      chmod +x codecov

      echo ${CODECOV_TOKEN}

      ./codecov -t ${CODECOV_TOKEN} -f "test-results/flutter.json"

Hi @madanshah114, I meant the snippet from CI (it should have the Codecov logo as ASCII) e.g.

     _____          _
    / ____|        | |
   | |     ___   __| | ___  ___ _____   __
   | |    / _ \ / _` |/ _ \/ __/ _ \ \ / /
   | |___| (_) | (_| |  __/ (_| (_) \ V /
    \_____\___/ \__,_|\___|\___\___/ \_/

  Codecov report uploader 0.2.3