Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automatic Test Coverage Not Executing Against lcov.info #1068

Closed
palisadoes opened this issue Dec 22, 2021 · 3 comments · Fixed by #1070
Closed

Automatic Test Coverage Not Executing Against lcov.info #1068

palisadoes opened this issue Dec 22, 2021 · 3 comments · Fixed by #1070
Assignees
Labels
bug Something isn't working test Testing application

Comments

@palisadoes
Copy link
Contributor

palisadoes commented Dec 22, 2021

Describe the bug

  1. GitHub action for code coverage should fail, but it passes. It may not be activated in the action.
  2. This used to work before.

Earlier today we added the coverage/ directory where the lcov.info file generated by the flutter test --coverage command and used by the genhtml to give the human readable output is located. We doubt that this is the cause of the issue, as it was failing earlier. This possibility should be included in your troubleshooting.

NOTE Upgrade to the latest version of very_good_coverage in the GitHub action

To Reproduce
Steps to reproduce the behavior:

  1. Run the following commands in sequence on your CLI (Make sure you have installed the lcov package first.
    flutter test --coverage
    genhtml coverage/lcov.info -o coverage
    
  2. You will see in the penultimate line of the genhtml command output that the coverage is 30%.
  3. Take a look at the GitHub actions pull request file.
    1. You will see that the VeryGoodOpenSource/very_good_coverage code coverage plugin that we are using has a min_coverage value of 32.
  4. If you examine one of the latest pull request GitHub actions output.
    1. You will see that the codebase testing section with flutter test --coverage runs. We assume the lcov.info file is created.
    2. Then you will see that the Report code coverage section runs, but:
    3. The value of 32 > 30, so the action should fail. It does not.

Expected behavior
GitHub action for code coverage should fail.

Actual behavior
GitHub action for code coverage passes.

Screenshots

This is a reproduction of what you should expect from the CLI with 30% coverage.

$ flutter test --coverage
$ genhtml coverage/lcov.info -o coverage
Reading data file coverage/lcov.info
Resolved relative source file path "lib/main.dart" with CWD to "/home/peter/GitHub/talawa/lib/main.dart".
Found 117 entries.
Found common filename prefix "/home/peter/GitHub/talawa"
Writing .css and .png files.
Generating output.
Processing file lib/splash_screen.dart
Processing file lib/router.dart
...
...
...
Processing file lib/widgets/video_widget.dart
Processing file lib/widgets/custom_progress_dialog.dart
Processing file lib/widgets/event_search_delegate.dart
Writing directory view page.
Overall coverage rate:
  lines......: 30.1% (1820 of 6052 lines)
  functions..: no data found

Additional details
None

@palisadoes palisadoes added the bug Something isn't working label Dec 22, 2021
@github-actions github-actions bot added test Testing application unapproved Unapproved, needs to be triaged labels Dec 22, 2021
@nishnatadebnath
Copy link

Please assign this to me.

@palisadoes palisadoes removed the unapproved Unapproved, needs to be triaged label Dec 22, 2021
@palisadoes
Copy link
Contributor Author

I updated the original text about the GitHub Actions file and the GitHub actions execution provide a better description of the issue.

@palisadoes
Copy link
Contributor Author

@nishnatadebnath Closed by accident. Reopened.

Ayush0Chaudhary pushed a commit to Ayush0Chaudhary/talawa that referenced this issue Mar 29, 2023
…reateEvent``` ```updateEvent``` ```createOrganization``` resolvers (PalisadoesFoundation#1068)

* add validations to create and update event

* add validations to create and update post

* add validations for create organization

* add validation to the signUp

* commented password validator for now

* fix regex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working test Testing application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants