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

Fix coverage stats #464

Merged
merged 2 commits into from
Jul 26, 2022
Merged

Fix coverage stats #464

merged 2 commits into from
Jul 26, 2022

Conversation

kachkaev
Copy link
Contributor

@kachkaev kachkaev commented Jul 26, 2022

I was documenting integration tests and noticed two issues with reported coverage. This PR fixes them.

  • We used npx kill-port 3000 in CI, which stopped next start with SIGKILL instead of SIGINT. Abrupt process termination meant that the runtime coverage was not reported. I have temporarily replaced yarn kill-port with kill -2 (i.e. SIGKILL with SIGINT). We can switch back when Add option for kill signal tiaanduplessis/kill-port#48 is closed upstream.

    ↑ this change increased reported code coverage

  • We did not have @istanbuljs/nyc-config-typescript in .nycrc.json, which caused some source files to be missing from the list of all files. In particular, all site/src/pages/api/**.ts files were not included into the report. Adding @istanbuljs/nyc-config-typescript made the list of files more complete.

    ↑ this change decreased reported code coverage

Overall coverage has decreased, but this is expected.

@github-actions github-actions bot added area: dependencies Relates to third-party or otherwise imported dependencies (area) area: infra Relates to version control, CI, CD or IaC (area) area: apps > site The blockprotocol.org website, inc. Hub (app) labels Jul 26, 2022
@codecov
Copy link

codecov bot commented Jul 26, 2022

Codecov Report

Merging #464 (825a6ee) into main (983acc7) will decrease coverage by 4.14%.
The diff coverage is n/a.

❗ Current head 825a6ee differs from pull request most recent head 68ee025. Consider uploading reports for the commit 68ee025 to get more accurate results

@@            Coverage Diff             @@
##             main     #464      +/-   ##
==========================================
- Coverage   66.42%   62.28%   -4.15%     
==========================================
  Files         183      225      +42     
  Lines        2880     3680     +800     
  Branches      738      891     +153     
==========================================
+ Hits         1913     2292     +379     
- Misses        740     1094     +354     
- Partials      227      294      +67     
Flag Coverage Δ
site-integration 62.28% <ø> (-4.15%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
site/src/components/mdx/mdx-page-content.tsx 66.12% <0.00%> (-12.91%) ⬇️
...src/pages/api/rewrites/sandboxed-block-demo.api.ts 54.05% <0.00%> (ø)
site/src/lib/api/middleware/db.middleware.ts 100.00% <0.00%> (ø)
...rc/pages/api/users/[shortname]/blocks/index.api.ts 100.00% <0.00%> (ø)
site/src/lib/api/middleware/passport.middleware.ts 100.00% <0.00%> (ø)
site/scripts/create-db-indexes.ts 0.00% <0.00%> (ø)
site/src/lib/api/model/user.model.ts 65.95% <0.00%> (ø)
site/src/pages/api/login-with-login-code.api.ts 47.36% <0.00%> (ø)
site/src/pages/api/upload-user-avatar.api.ts 0.00% <0.00%> (ø)
...src/pages/api/users/[shortname]/types/index.api.ts 100.00% <0.00%> (ø)
... and 40 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3b69278...68ee025. Read the comment docs.

@kachkaev kachkaev marked this pull request as ready for review July 26, 2022 19:42
@kachkaev kachkaev requested a review from teenoh July 26, 2022 19:42
Copy link
Contributor

@teenoh teenoh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: apps > site The blockprotocol.org website, inc. Hub (app) area: dependencies Relates to third-party or otherwise imported dependencies (area) area: infra Relates to version control, CI, CD or IaC (area)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants