-
Notifications
You must be signed in to change notification settings - Fork 248
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
ci: compile test_examples{,_small}.yml
with near_workspaces::compile_project
#1253
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #1253 +/- ##
==========================================
+ Coverage 80.14% 80.30% +0.16%
==========================================
Files 102 102
Lines 14598 14598
==========================================
+ Hits 11699 11723 +24
+ Misses 2899 2875 -24 ☔ View full report in Codecov by Sentry. |
|
@race-of-sloths include |
@dj8yfo Thank you for your contribution! Your pull request is now a part of the Race of Sloths! Current status: executed
Your contribution is much appreciated with a final score of 8! @frol received 25 Sloth Points for reviewing and scoring this pull request. Congratulations @dj8yfo! You have achieved a Gold rank in the Hall of Sloth fame! We add another +{lifetime_reward}% lifetime bonus to all rating points you earn with your next contributions with your total bonus being now 15%! What is the Race of SlothsRace of Sloths is a friendly competition where you can participate in challenges and compete with other open-source contributors within your normal workflow For contributors:
For maintainers:
Feel free to check our website for additional details! Bot commands
|
f806125
to
7be211e
Compare
test_examples{,_small}.yml
with near_workspaces::compile_project
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dj8yfo Overall, it looks great, but how much did it affect CI times?
#[rstest] | ||
#[tokio::test] | ||
async fn simulate_simple_approve() -> anyhow::Result<()> { | ||
let worker = near_workspaces::sandbox().await?; | ||
let (nft_contract, alice, token_receiver_contract, _) = init(&worker).await?; | ||
async fn simulate_simple_approve( | ||
#[future] initialized_contracts: anyhow::Result<(Contract, Account, Contract, Contract)>, | ||
) -> anyhow::Result<()> { | ||
let (nft_contract, alice, token_receiver_contract, _) = initialized_contracts.await?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we win much from using fixtures here? It took me several minutes to figure out and I think it is unnecessary magical, and makes the code less readable. Also, rstest dependency might add extra compilation time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
such a minimal manifest with rstest
with a corresponding test
[package]
name = "rstest_play"
version = "0.1.0"
edition = "2021"
[dependencies]
[dev-dependencies]
rstest = "0.23.0"
compiles for
Compiling rstest v0.23.0
Finished `test` profile [unoptimized + debuginfo] target(s) in 4.86s
on my machine, which would probably mean 10-15 secs on gh executor
referencing nearuaguild/abstract-dao#9 , as full picture will be important anyway. Likely the contract therein has been fixed by changes introduces, because the state of the base branch of pr Whereas the test passes in the compare branch of pr on 1.82 |
…386) PR addresses this TODO near/near-sdk-rs#1253 (comment) , which later ~will be~ has been removed from `near-sdk` code, for cases: 1. when non-async function is required in `static std::sync::OnceLock<T>/LazyLock<T, F>` creation like here https://github.com/dj8yfo/near-sdk-rs/blob/7be211e1b2991f6c5b4db78972784dac2f066e32/examples/fungible-token/tests/workspaces.rs#L47 2. when non-default build is required like with `no-abi` here https://github.com/dj8yfo/abstract-dao/blob/fe9d16797bf582f0ea24380c1e4ad6bdb8c97283/tests/common.rs#L33 PR avoids necessity to import `cargo-near-build` separately as a dependency PR should best be published with a major release, to avoid weird breakage `0.14.1 -> 0.14.x` Co-authored-by: dj8yf0μl <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@race-of-sloths score 8
No description provided.