Node: Fix Node.js' code coverage/code coverage job

Created on 14 Oct 2020  路  5Comments  路  Source: nodejs/node

  • Version: 15.x.x
  • Platform: All
  • Subsystem: test

The problem(s)

1. new file paths are breaking the coverage reporting

File paths for Node.js' own files now have this form node:/internal/cluster/shared_handle:

  • there's now anode: prefix.
  • there's no longer a .js prefix.

I will happily fix this problem in the test reporter, but could someone point me towards where these changes were made (_@watilde, @guybedford?_) -- I want to make sure I link to the change in the reporter codebase.

2. nightly coverage is broken again

Coverage has been broken for several nights in a row. I believe this is due to an unrelated CI/CD upgrade?

Suggested fix

  1. let's update c8 to support the new path format (_I've tested that this fix is pretty trivial_).
  2. let's move code coverage to GitHub Actions (_It seems like we need to fix Jenkins once every few months, and I can't see a reason why not to use actions_).

CC: @nodejs/testing

coverage test

All 5 comments

could someone point me towards where these changes were made

I believe this has been introduced by https://github.com/nodejs/node/pull/35498.

@aduh95 thank you! (_sorry for looping in the wrong folks, I assumed it was potentially the new URL parser)_.

Have we ever tried adding c8 to https://github.com/nodejs/citgm/ ? (I searched for it and I don't think so?)

we should add it, it isn't included right now afaik. For reference this is the lookup table

https://github.com/nodejs/citgm/blob/main/lib/lookup.json

Have we ever tried adding c8 to https://github.com/nodejs/citgm/ ? (I searched for it and I don't think so?)

@joyeecheung @MylesBorins not a bad idea, but it wouldn't have actually caught this, because it only breaks on Node.js' own coverage -- which now has different file paths (_c8 would continue working for userland._)

Was this page helpful?
0 / 5 - 0 ratings