Run browser tests to collect code coverage data#21359
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #21359 +/- ##
==========================================
+ Coverage 81.39% 89.47% +8.08%
==========================================
Files 260 260
Lines 65927 65927
==========================================
+ Hits 53660 58991 +5331
+ Misses 12267 6936 -5331
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
7b59307 to
05b0fd6
Compare
|
It's a pretty excellent idea :) especially because it'll improve overall performances of ref tests. |
That sounds reasonable, but unfortunately I don't really know what that'd look like (or have time to figure it out either). |
I was basically thinking about hacking the canvas factory in order to just replace the drawing primitives by empty functions, something like: for (const name in [...]) {
ctx[name] = () => {};
} |
05b0fd6 to
a1fe150
Compare
Would there be a small risk that that could change how rendering works, and thus what paths are covered, e.g. if there's Besides, is it really worth the added complexity considering just how fast this new coverage job already runs? |
Obviously it's not yet possible to just migrate `gulp browsertest` to GitHub Actions, however it's already possible to at least run the browser tests there which allows collection of more code coverage data. This should thus give us more realistic coverage numbers, since currently there's many `src/` files that have very low code coverage. By taking advantage of the fact that the GitHub Actions runners provide multiple cores, these tests are also fairly fast: - The ubuntu-latest/firefox job complete in ~9 minutes.
a1fe150 to
890edc9
Compare
Obviously it's not yet possible to just migrate
gulp browsertestto GitHub Actions, however it's already possible to at least run the browser tests there which allows collection of more code coverage data.This should thus give us more realistic coverage numbers, since currently there's many
src/files that have very low code coverage.By taking advantage of the fact that the GitHub Actions runners provide multiple cores, these tests are also fairly fast:
Please note: I completely understand if this is deemed pointless since we still need to use the old bots for actual testing, but I figured that submitting this for consideration couldn't hurt.