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

test: increase coverage build function #194

Closed
wants to merge 5 commits into from
Closed

Conversation

AlexD10S
Copy link
Collaborator

@AlexD10S AlexD10S commented May 27, 2024

Unit tests for the build parachain and build contracts processes.

Utilize mocks for the external crates that are used: duct::cmd for building parachain and contract_build::execute for building contracts.

Copy link

codecov bot commented May 27, 2024

Codecov Report

Attention: Patch coverage is 90.12346% with 8 lines in your changes are missing coverage. Please review.

Project coverage is 57.81%. Comparing base (3cfff73) to head (c7f5804).
Report is 3 commits behind head on main.

@@            Coverage Diff             @@
##             main     #194      +/-   ##
==========================================
+ Coverage   55.97%   57.81%   +1.83%     
==========================================
  Files          33       36       +3     
  Lines        3398     3584     +186     
  Branches     3398     3584     +186     
==========================================
+ Hits         1902     2072     +170     
+ Misses       1213     1198      -15     
- Partials      283      314      +31     
Files Coverage Δ
crates/pop-cli/src/main.rs 26.98% <ø> (ø)
crates/pop-cli/src/mock.rs 100.00% <100.00%> (ø)
crates/pop-contracts/src/mock.rs 100.00% <100.00%> (ø)
crates/pop-parachains/src/mock.rs 100.00% <100.00%> (ø)
crates/pop-contracts/src/build.rs 82.35% <90.00%> (+82.35%) ⬆️
crates/pop-parachains/src/build.rs 81.81% <80.00%> (+81.81%) ⬆️
crates/pop-cli/src/commands/build/contract.rs 70.37% <83.33%> (+70.37%) ⬆️
crates/pop-cli/src/commands/build/parachain.rs 75.75% <86.95%> (+75.75%) ⬆️

... and 3 files with indirect coverage changes

@AlexD10S AlexD10S requested review from peterwht and evilrobot-01 May 28, 2024 06:59
Copy link
Collaborator

@Daanvdplas Daanvdplas left a comment

Choose a reason for hiding this comment

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

I idea is to perhaps place the parachain tests within this PR together, and the contracts tests. Now there is a split in the tests which can then perhaps be prevented. Not completely sure though

crates/pop-cli/src/commands/build/contract.rs Show resolved Hide resolved
crates/pop-cli/src/commands/build/contract.rs Show resolved Hide resolved
crates/pop-contracts/src/mock.rs Outdated Show resolved Hide resolved
crates/pop-contracts/src/mock.rs Show resolved Hide resolved
crates/pop-contracts/src/lib.rs Show resolved Hide resolved
@AlexD10S AlexD10S closed this Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants