-
Notifications
You must be signed in to change notification settings - Fork 2
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: add transaction package integration tests #146
Conversation
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.
Is this supposed to be here? It showed up after the rebase, I'm not sure if I need to gitignore it something.
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.
This is certianly my fault, and this makes me realize I don't think I understand the idioms around lock files. Do these need to be in each package, or is pnpm
meant to make package-lock.json
files within the workspace root and not each sub package.
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.
Ohhh I see. I thought that it's supposed to be committed to the repo in this directory, but I'm not entirely sure. I'll find out.
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.
I don't know about that particular lock file, but when it comes to committing lock files or not the rule of thumb I'm following is that it should be committed for binaries but not for libraries.
Since this is primarily a binary (or a set of binaries) we're developing and not a generic library to be imported by other people, I believe we should generally commit lock files.
Though this is a Cargo convention, and I don't know what the convention is in JavaScript land.
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.
So I think this was generated from my .generated-sources/emily/build.rs
file, which calls npm
still. Should I just delete that file, is it still relevant?
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.
For this PR, I would like to see it deleted because it's irrelevant for #67. But I'd be open to seeing it committed as a follow-up depending on what convention we'd like to follow for this file. But it should either be committed or explicitly ignored in .gitignore
.
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.
Yeah, we still need it because it adds the clippy labels to to prevent the clippy warnings.
But we could certainly have it call pnpm, I'll change that.
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.
Wait I'm confused, the lock file doesn't add any Clippy labels right? I mean, I frequently delete it from my local repo and that seems to be alright.
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.
Wait I'm confused, the lock file doesn't add any Clippy labels right? I mean, I frequently delete it from my local repo and that seems to be alright.
I think he was referring to .generated-sources/emily/build.rs
. Also, should that file be unignored?
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.
We should figure this all out in a separate PR. I'll be removing this and adding it back later.
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.
This is certianly my fault, and this makes me realize I don't think I understand the idioms around lock files. Do these need to be in each package, or is pnpm
meant to make package-lock.json
files within the workspace root and not each sub package.
6f2556c
to
96cd0da
Compare
70a7ba3
to
910c03d
Compare
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.
It's great to see these integration tests! I just have some nits and style opinions.
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.
For this PR, I would like to see it deleted because it's irrelevant for #67. But I'd be open to seeing it committed as a follow-up depending on what convention we'd like to follow for this file. But it should either be committed or explicitly ignored in .gitignore
.
e1d3fe3
to
502e1ca
Compare
Description
Address part of #67.
This PR mainly sets up integration tests with bitcoin-core. Specifically it:
UnsignedTransactions
returned in theutxo
module successfully moves deposits to the signer's UTXO.utxo
module to useXOnlyPublicKey
since bitcoin-core expects Schnorr public keys to be 32-bit x-coordinate only keys.Testing information
This PR mainly adds tests but also changes how testing is done.
The biggest difference is thatRunningcargo test
now runs our integration tests and will fail if bitcoin-core is not running locally. To get around that docargo test --lib
ormake test
if you don't want to run integration tests.make integration-test
now starts a docker container withbitcoind
and stops the container if tests succeed.Checklist
make integration-test
passes