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

feat(coverage): Add back coverage support for txtar #2377

Merged
merged 10 commits into from
Jul 29, 2024

Conversation

gfanton
Copy link
Member

@gfanton gfanton commented Jun 18, 2024

Add back coverage support for txtar, which was removed during the CI rework.
This only includes txtar test files from gnovm package (not those for gnoland, I will do that in another PR).
It adds approximately 5% coverage, which is a non-negligible.

Contributors' checklist...
  • Added new tests, or not needed, or not feasible
  • Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • Updated the official documentation or not needed
  • No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • Added references to related issues and PRs
  • Provided any useful hints for running manual tests
  • Added new benchmarks to generated graphs, if any. More info here.

@gfanton gfanton self-assigned this Jun 18, 2024
@gfanton gfanton requested review from moul and a team as code owners June 18, 2024 09:39
@gfanton gfanton requested review from petar-dambovaliev and removed request for a team June 18, 2024 09:39
Copy link

codecov bot commented Jun 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 60.11%. Comparing base (0e3c050) to head (cf276f1).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2377      +/-   ##
==========================================
+ Coverage   54.99%   60.11%   +5.11%     
==========================================
  Files         595      560      -35     
  Lines       79775    74686    -5089     
==========================================
+ Hits        43872    44895    +1023     
+ Misses      32581    26400    -6181     
- Partials     3322     3391      +69     
Flag Coverage Δ
contribs/gnodev 60.58% <ø> (+34.58%) ⬆️
contribs/gnofaucet 14.46% <ø> (ø)
gno.land 64.15% <ø> (ø)
gnovm 64.18% <ø> (+3.97%) ⬆️
misc/genstd 80.54% <ø> (ø)
misc/logos 20.23% <ø> (+2.85%) ⬆️
tm2 62.05% <ø> (+7.55%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@gfanton gfanton added the don't merge Please don't merge this functionality temporarily label Jun 18, 2024
@gfanton gfanton removed the don't merge Please don't merge this functionality temporarily label Jun 18, 2024
Copy link
Contributor

@ajnavarro ajnavarro left a comment

Choose a reason for hiding this comment

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

It looks like gnovm coverage went down 20%, we have to check why.

@gfanton
Copy link
Member Author

gfanton commented Jun 19, 2024

I don't think we actually lost coverage. I believe the reason why the gnovm flag coverage is decreasing by 20% is because enabling coverage on txtar also generates coverage for tm2 packages. Therefore, the gnovm directory itself has not lost coverage. However, by including tm2 packages in the gnovm flags, we cover 20% less than gnovm packages only.

Coverage with gnovm flags including txtar (from gnovm/cmd/gno):
image

Coverage with gnovm flags excluding txtar (from gnovm/cmd/gno):
image

@gfanton
Copy link
Member Author

gfanton commented Jun 19, 2024

@ajnavarro An idea to avoid having gnovm flags "corrupted" by txtar coverage, is to put txtar coverage under its own flag, such as gnovm/txtar.

@gfanton
Copy link
Member Author

gfanton commented Jun 19, 2024

@ajnavarro should be good now

@ajnavarro
Copy link
Contributor

IMO having txtar on its own coverage tag does not makes sense... A tag is defined per module we are testing, not by a group of tests...

What is specifically testing txtar? gnovm? tm2? gno node? a mix?
If we have a mix of tests testing different modules we should split them to be on these modules, if not it might be eventually a nightmare.

@github-actions github-actions bot added 🧾 package/realm Tag used for new Realms or Packages. 📦 🤖 gnovm Issues or PRs gnovm related 📦 🌐 tendermint v2 Issues or PRs tm2 related labels Jul 23, 2024
@github-actions github-actions bot added the 📦 ⛰️ gno.land Issues or PRs gno.land package related label Jul 23, 2024
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton
Copy link
Member Author

gfanton commented Jul 28, 2024

i've added filtering by module so it doesn't expand coverage on multiple tags

Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
@gfanton gfanton merged commit bf61069 into gnolang:master Jul 29, 2024
116 checks passed
@gfanton gfanton deleted the feat/txtar-coverage branch July 29, 2024 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📦 🌐 tendermint v2 Issues or PRs tm2 related 📦 ⛰️ gno.land Issues or PRs gno.land package related 📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants