-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Code coverage for monorepo #6478
Comments
Tentatively estimating it at 4 points, but it's a blind shot as first we need to clarify the requirements. |
The most challenging fact about this task is to allow for per-package code coverage while moving to monorepo structure. I'm getting promising results using codecov. While working on ckeditor5 repo sandbox copy I made a branch with just a few packages modified and the testing script correctly picked up which packages should be tested 👍 Now, there are still couple of things to do:
|
I noticed a problem on Restarting travis build would eventually lead to full test run, and full code coverage. So clearly there's some integration problem. The symptoms were that only part of tests were executed:
And there were several logs:
And I think this one bit is a key to the problem. |
Today we decided to change a little our goals for CI. The main goal remains to be able to tell the CC per package, but it's no longer a must-have for us to keep these results separate on codecov (a short backstory is that we wanted to pass per-package coverage using flags mechanism in codecov, but once there are 50+ flags it didn't reliably put nice bot messages to GH PRs). Instead the per-package-coverage will be performed on Travis alone. And if any of the packages shows a lower code coverage then it should place a fail status in related PR. Travis will execute test for each package separately (so a dedicated I already checked that combining json output works fine so we should be good here. |
Ok, I created a script that does per-package testing and combines the results once all are done and uploads combined results to codecov. The solution is ready for review in #6605 Failing testsEach CKE5 package is tested separately. Failing package suite doesn't stop others from running. It was important goal for me to make sure that all package suites are run - so that you get a full picture of what's wrong. You can see an example build where some autoformat test cases are failing (also some packages are missing coverage). For readabilty passing suites do not print the output. Incomplete package coverageHere's an example test run where table and It concludes it with a message "Following packages did not provide required code coverage: table cloud-services-core" at the end and marks the CI build as failed. Note that the combined result uploaded to codecov show (almost because master branch that we used had incomplete tests for TimingIt takes ~13 minutes to finish the testing. Codecov flagsAs of today it doesn't make sense to use codecov's flags - it doesn't bring any value. Even the docummentation says:
|
I moved this back to it31 as a great majority of the work was done already. If you want to have a followup in it32, please report a new ticket. |
Provide a description of the task
A tricky case might be to do per-package code coverage after going for monorepo.
📃 Other details
This is a subtask of #6466.
The text was updated successfully, but these errors were encountered: