mobileappdevhm20 / team-project-team_7

team-project-team_7 created by GitHub Classroom
0 stars 0 forks source link

Codecov integration #29

Closed devtobi closed 4 years ago

devtobi commented 4 years ago

Check if coveralls can be enabled for the flutter based project. If so, enable it and integrate the coverage badge in the README.

devtobi commented 4 years ago

Mrs Socher stated that we should use Codecov or Sonarcloud for coverage testing. Since Sonarcloud does not support the dart language we are going to use Codecov

devtobi commented 4 years ago

I have setup the coverage generation in flutter test. I added the codecov token to the environment variables of the ci pipeline. Also a custom script after testing is run that uploads the coverage report to codecov.

However I can't test it since the Test "Login" inside login_bloc_test is not successful ran on the pipeline. However It runs perfectly fine locally. @m1n1 Please fix this issue.

devtobi commented 4 years ago

To be honest I did not expect the codecov integration to be that hard. I fixed the custom script which should work now. However the testing stage does fail on Codemagic and strangely I don't know why. It says all tests are working but still it's failing... Im contacting the support for this issue.

devtobi commented 4 years ago

@mobileappdevhm20/team_7 This literally drives me crazy. I tried everything to get the tests back to working in the pipeline. After almost 4 hours I now found out that once I remove the --coverage flag from flutter test its working fine again. I did some research and this seems to be a common but in the flutter test tool. Here is the GitHub issue: https://github.com/flutter/flutter/issues/35907 We have to disable coverage for now...

devtobi commented 4 years ago

However we can upload tokens from local machines. Todo that first of all run flutter test --coverage in your terminal. A coverage folder will be created inside the project root. Now run the following command: bash <(curl -s https://codecov.io/bash) -t 0363754c-be0b-4be9-901e-ac6d96c858f7

This Is the upload token but because we have access to all projects on codecov from the organisation its not critical to post it here.