very_good_coverage icon indicating copy to clipboard operation
very_good_coverage copied to clipboard

parsing error!

Open ilyes9595 opened this issue 4 years ago • 6 comments

Describe the bug I'm aware that there is already an issue about this one but I was closed without giving a proper solution, the issue is probably with the lcov.info file which by the way I don't have enough information about what it is exactly or where it's been generated, so for now every time I run the action i got this message: Error: parsing error!

To Reproduce This is my job: ` build-app:

name: Build App

runs-on: ubuntu-latest

steps:

  - name: Checkout repository
  
    uses: actions/checkout@v1

  - name: Set up Java
  
    uses: actions/setup-java@v2

    with:

      java-version: '15'

      distribution: 'adopt'

  - name: Set up Flutter
  
    uses: subosito/flutter-action@v1

    with:

      channel: 'stable'

  - name: Install pub Dependencies
  
    run: flutter pub get

  - name: analytics
  
    uses: VeryGoodOpenSource/[email protected]

    with:

      path: './coverage/lcov.info'

      min_coverage: 10`
  1. See error `Run VeryGoodOpenSource/[email protected] with: path: ./coverage/lcov.info

    min_coverage: 10 env: JAVA_HOME: /opt/hostedtoolcache/Java_Adopt_jdk/15.0.2-7/x64

    FLUTTER_ROOT: /opt/hostedtoolcache/flutter/2.5.3-stable/x64

    PUB_CACHE: /opt/hostedtoolcache/flutter/2.5.3-stable/x64/.pub-cache Error: parsing error!`

Expected behavior The action run with success

ilyes9595 avatar Nov 05 '21 10:11 ilyes9595

Hi @ilyes9595 👋 Thanks for opening an issue!

Do you have a link to an example ci failure?

felangel avatar Nov 05 '21 14:11 felangel

@felangel thank you for reaching out, here is a link to the CI: https://github.com/mejdi14/flutter_multi_search/runs/4118992173?check_suite_focus=true and this is the link to the script itself: https://github.com/mejdi14/flutter_multi_search/blob/master/.github/workflows/build.yml

ilyes9595 avatar Nov 05 '21 15:11 ilyes9595

@felangel thank you for reaching out, here is a link to the CI: https://github.com/mejdi14/flutter_multi_search/runs/4118992173?check_suite_focus=true and this is the link to the script itself: https://github.com/mejdi14/flutter_multi_search/blob/master/.github/workflows/build.yml

Thanks for sharing! I believe the issue is the very_good_coverage can't find an lcov.info file. Are you sure you have run your test suite and enabled test coverage? You can check out https://github.com/VeryGoodOpenSource/mockingjay/blob/556a7618e9c11f8a9c26f2493686efc24b5b9a1d/.github/workflows/main.yaml#L26 for an example of collecting coverage before running very_good_coverage.

Let me know if that helps 👍

felangel avatar Nov 05 '21 21:11 felangel

Hey @ilyes9595 you must validate that generate the coverage file, in my case i used this command jest -- --coverage --forceExit

MarxBarahonaCondor avatar Jul 26 '22 22:07 MarxBarahonaCondor

Hey @ilyes9595 you must validate that generate the coverage file, in my case i used this command jest -- --coverage --forceExit

As my estimated partner said, check that you are generating the coverage file in the path specified, you can use act (a tool to test actions in local environment) to check that kind of issues, in the previous step you can run a ls to check all the files

janncamoreno avatar Jul 26 '22 22:07 janncamoreno

Hey @ilyes9595 you must validate that generate the coverage file, in my case i used this command jest -- --coverage --forceExit

👏

kpedrozag avatar Jul 26 '22 22:07 kpedrozag

@ilyes9595 is this still an issue for you?

This occurs when the coverage tool fails to find a coverage file, which makes it fail since there is no coverage information.

Is your issue related to #167 ?

alestiago avatar Mar 07 '23 13:03 alestiago

I'm closing this issue due to inactivity, feel free to re-open 🙌

alestiago avatar Sep 19 '23 10:09 alestiago