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

Test coverage for Monorepo with travis-CI #423

Open
hamzahamidi opened this issue Mar 8, 2020 · 3 comments
Open

Test coverage for Monorepo with travis-CI #423

hamzahamidi opened this issue Mar 8, 2020 · 3 comments
Assignees

Comments

@hamzahamidi
Copy link

I have a monorepo project containing multiple libraries using ng-packagr
I managed to get & upload the test coverage of the repository.
But how can I get the coverage of each package?
This is the script I'm using

        - ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.core.json coverage/ajsf-core/lcov.info  
        - ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.bs3.json coverage/ajsf-bootstrap3/lcov.info  
        - ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.bs4.json coverage/ajsf-bootstrap4/lcov.info  
        - ./cc-test-reporter format-coverage -t lcov -o coverage/codeclimate.material.json coverage/ajsf-material/lcov.info  
        - ./cc-test-reporter sum-coverage coverage/codeclimate.*.json -p 4    
        - echo $TRAVIS_TEST_RESULT
        - if [[ "$TRAVIS_TEST_RESULT" == 0 ]]; then ./cc-test-reporter upload-coverage; fi  
@zackerydev
Copy link

We have a similar use case, we want to be able to run and calculate coverage of only the packages in our lerna repo that have changed since the base ref of the PR.

It would be great if Code Climate could support breaking up coverage reports by package instead of requiring a summation and global percentage.

@awentzel
Copy link

@hamzahamidi and @zgriesinger did either of you figure this out?

@hamzahamidi
Copy link
Author

@awentzel In my case I switched to codecov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants