Skip to content

Use flags for coverage at the package level#1412

Merged
tynes merged 1 commit intoethereum-optimism:developfrom
rajivpo:rajiv/add-coverage-with-flags
Sep 7, 2021
Merged

Use flags for coverage at the package level#1412
tynes merged 1 commit intoethereum-optimism:developfrom
rajivpo:rajiv/add-coverage-with-flags

Conversation

@rajivpo
Copy link
Contributor

@rajivpo rajivpo commented Sep 2, 2021

Description

  • Use of nyc which is a wrapper around mocha for coverage
  • use of flags for codecov to enable package-level coverage badges and reporting

Additional context
Future pull requests will serve to actually improve coverage of the typescript packages.

Metadata

@changeset-bot
Copy link

changeset-bot bot commented Sep 2, 2021

🦋 Changeset detected

Latest commit: 21b17ed

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 4 packages
Name Type
@eth-optimism/batch-submitter Patch
@eth-optimism/core-utils Patch
@eth-optimism/data-transport-layer Patch
@eth-optimism/message-relayer Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added 2-reviewers A-pkg-core-utils Area: packages/core-utils labels Sep 2, 2021
@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2021

Codecov Report

Merging #1412 (21b17ed) into develop (1f1fff9) will decrease coverage by 10.15%.
The diff coverage is 83.75%.

Impacted file tree graph

@@             Coverage Diff              @@
##           develop    #1412       +/-   ##
============================================
- Coverage    86.05%   75.90%   -10.16%     
============================================
  Files           49       81       +32     
  Lines         1936     3017     +1081     
  Branches       307      463      +156     
============================================
+ Hits          1666     2290      +624     
- Misses         270      727      +457     
Flag Coverage Δ
batch-submitter 60.91% <87.83%> (?)
contracts 86.05% <100.00%> (?)
core-utils 61.22% <0.00%> (?)
data-transport-layer 37.86% <ø> (?)
message-relayer 72.22% <ø> (?)

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

Impacted Files Coverage Δ
...thereum/OVM/predeploys/OVM_L2ToL1MessagePasser.sol 100.00% <ø> (ø)
packages/core-utils/src/watcher.ts 4.00% <0.00%> (ø)
...ubmitter/src/batch-submitter/tx-batch-submitter.ts 44.29% <57.14%> (ø)
...ackages/batch-submitter/src/utils/tx-submission.ts 88.46% <88.46%> (ø)
...h-submitter/src/batch-submitter/batch-submitter.ts 83.15% <100.00%> (ø)
...itter/src/batch-submitter/state-batch-submitter.ts 73.68% <100.00%> (ø)
packages/batch-submitter/src/index.ts 100.00% <100.00%> (ø)
.../batch-submitter/src/transaction-chain-contract.ts 81.81% <100.00%> (ø)
packages/batch-submitter/src/utils/index.ts 100.00% <100.00%> (ø)
...c-ethereum/libraries/standards/L2StandardERC20.sol 100.00% <100.00%> (ø)
... and 32 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 0f13375...21b17ed. Read the comment docs.

@github-actions github-actions bot added A-op-batcher Area: op-batcher M-dtl labels Sep 2, 2021
@rajivpo
Copy link
Contributor Author

rajivpo commented Sep 2, 2021

It appears that codecov isn't pushing the update despite the github action being completed (https://codecov.io/gh/ethereum-optimism/optimism/commit/64b6f5481c9be1391ad12db41f92d4a01079fde6/graphs). Pushed a changeset commit to see if a re-run will help.

@rajivpo
Copy link
Contributor Author

rajivpo commented Sep 2, 2021

So looks like it's getting all the relevant coverage, but failing to post some of it via the github codecov-commenter user

image

@rajivpo rajivpo marked this pull request as ready for review September 2, 2021 18:16
@rajivpo rajivpo changed the title [WIP] Use Flags for Coverage on a Package basis Use flags for coverage at the package level Sep 2, 2021
Copy link
Contributor Author

Choose a reason for hiding this comment

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

As per this url, it should show the badges as per the coverage on master in the readme, but it doesn't quite exist yet. If it would be helpful, I can change this branch for the time being so results in are viewable in the READMEs of this PR

@tynes
Copy link
Contributor

tynes commented Sep 3, 2021

So looks like it's getting all the relevant coverage, but failing to post some of it via the github codecov-commenter user

Its possible this isn't happening because of github permissions, sometimes there are issues with PRs coming in from people outside of the org

@tynes
Copy link
Contributor

tynes commented Sep 3, 2021

Thank you for this work!

@tynes
Copy link
Contributor

tynes commented Sep 3, 2021

If you squash this into a single commit, this is good to merge

@rajivpo
Copy link
Contributor Author

rajivpo commented Sep 3, 2021

awesome sounds good

@rajivpo rajivpo force-pushed the rajiv/add-coverage-with-flags branch from 659cb08 to 21b17ed Compare September 4, 2021 02:46
@tynes tynes merged commit 3029c68 into ethereum-optimism:develop Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-op-batcher Area: op-batcher A-pkg-core-utils Area: packages/core-utils

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants