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

PoX-4 Clarunit Setup & Initial Tests #4231

Merged
merged 16 commits into from
Mar 4, 2024
Merged

Conversation

setzeus
Copy link
Collaborator

@setzeus setzeus commented Jan 4, 2024

Description

This PR introduces the new @stacks/clarunit to allow for writing boot contract unit tests in Clarity. Clarunit is uses Clarinet SDK so all the goodness that comes with Clarinet is preserved.

Only some basic tests are introduced in this PR. Increasing code coverage will be done in follow-up PRs.

Applicable issues

Issue wasn't created but this is a continuation of the work done in #4100.

Copy link

codecov bot commented Jan 4, 2024

Codecov Report

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

Project coverage is 83.19%. Comparing base (d063a74) to head (a9ef3ba).
Report is 10 commits behind head on next.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #4231      +/-   ##
==========================================
- Coverage   83.46%   83.19%   -0.27%     
==========================================
  Files         448      453       +5     
  Lines      323930   325191    +1261     
  Branches        0      316     +316     
==========================================
+ Hits       270352   270530     +178     
- Misses      53578    54653    +1075     
- Partials        0        8       +8     
Files Coverage Δ
contrib/core-contract-tests/tests/bns_test.clar 80.00% <80.00%> (ø)
contrib/core-contract-tests/tests/pox_4_test.clar 78.37% <78.37%> (ø)

... and 27 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

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

Copy link
Collaborator

@friedger friedger left a comment

Choose a reason for hiding this comment

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

Some comments

stackslib/src/chainstate/stacks/boot/pox-4.clar Outdated Show resolved Hide resolved
@MarvinJanssen
Copy link
Member

MarvinJanssen commented Jan 23, 2024

@setzeus package @stacks/clarunit has been published by @wileyj. https://www.npmjs.com/package/@stacks/clarunit

The package can be replaced and pinned. I assume we can move the PR out of draft after that?

@setzeus
Copy link
Collaborator Author

setzeus commented Jan 23, 2024

Yeap @MarvinJanssen will do! Though atm this is on pause until at least EOM / Argon completion.*

setzeus added a commit that referenced this pull request Feb 16, 2024
@setzeus setzeus force-pushed the feat/pox-4-initial-clarity-tests branch from f14ef3d to ecbf216 Compare February 22, 2024 02:16
@MarvinJanssen MarvinJanssen force-pushed the feat/pox-4-initial-clarity-tests branch from ecbf216 to 5edc6f6 Compare February 25, 2024 19:51
@MarvinJanssen MarvinJanssen force-pushed the feat/pox-4-initial-clarity-tests branch from df6ba3d to 8933c5b Compare February 27, 2024 13:13
@setzeus setzeus marked this pull request as ready for review February 27, 2024 14:44
@setzeus setzeus changed the title PoX-4 Initial Clarity Tests [draft for testing - do not merge] PoX-4 Clarunit Setup & Initial Tests Feb 27, 2024
@setzeus
Copy link
Collaborator Author

setzeus commented Feb 27, 2024

Note: per the ClarityWG discussion on 2/27, this PR does NOT include a generated coverage file. There were a few issues in how & where it's generated so we're creating an issue as a placeholder to ensure we deal with it next.

@MarvinJanssen
Copy link
Member

I understood we want to merge this sooner rather than later and work on code coverage in the next PR.

@MarvinJanssen MarvinJanssen self-assigned this Feb 29, 2024
@MarvinJanssen
Copy link
Member

Codecov now picks up the Clarinet coverage report. Up until now it was silently failing because the path was incorrect. I added fail_ci_if_error (-Z) to make sure the Codecov action exits with a non-zero code when it fails.

See #4434 for more.

Copy link
Contributor

@obycode obycode left a comment

Choose a reason for hiding this comment

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

lgtm!

Copy link
Contributor

@wileyj wileyj left a comment

Choose a reason for hiding this comment

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

shipit

@wileyj wileyj enabled auto-merge March 4, 2024 15:13
@wileyj wileyj added this pull request to the merge queue Mar 4, 2024
Merged via the queue into next with commit 0a4a6d3 Mar 4, 2024
2 checks passed
@blockstack-devops
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@stacks-network stacks-network locked as resolved and limited conversation to collaborators Nov 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants