joinmarket-clientserver icon indicating copy to clipboard operation
joinmarket-clientserver copied to clipboard

GitHub workflow update (Python and Bitcoin Core versions)

Open kristapsk opened this issue 2 years ago • 4 comments

  • Remove Python 3.6 (EOL), add Python 3.10.
  • Add support for testing against multiple Bitcoin Core versions, add 0.18.0 (oldest officially support for test suite) and 22.0 (latest stable release). Previously we tested against hardcoded 0.19.1. IMO testing against oldest supported and latest makes sense, if tests pass on both, they should pass on releases inbetween too, unless there is some behaviour affecting us changed twice.

Also changed Core downloads from bitcoin.org to bitcoincore.org.

For now, opening PR as a test and for discussion. Will increase running time 2x.

kristapsk avatar Apr 03 '22 16:04 kristapsk

Another thing we don't test is aarch64 (arm64). That would also double number of checks, but no point even trying that right now as ARM tests are currently broken.

kristapsk avatar Apr 03 '22 18:04 kristapsk

Will increase running time 2x.

Actually not, as they run in parallel. Question is - what limits do we have here? I have no idea.

kristapsk avatar Apr 04 '22 12:04 kristapsk

Will increase running time 2x.

Actually not, as they run in parallel. Question is - what limits do we have here? I have no idea.

Yeah I'm really uncertain about what's going on here. Builds in parallel, sure, but still .. compute cost? Also, is caching somehow applied? I somehow got that impression a while back, because I saw some CI test runs finish really quickly, whereas on my machine (which is fairly high end), it was taking 14 minutes or so. I guess caching could work if: there are no edits to jmdaemon then maybe it doesn't run the tests in there? I guess that should make sense with well designed tests - the tests should test specifically and only the contents of the package, and any external dependencies should be somehow mocked. But I don't know the dividing line between theory and practice there.

Certainly if we started thinking about all the different configurations in which you could run this application, there would be an exponential blowup in the number of test runs.

We should probably using mocking more aggressively than we do in our tests ... or should we? - that would just stop us observing how our code fails to run with Bitcoin Core version XX - the RPC interface to Core is a moving target.

I guess that's just part of the whole integration/e2e testing vs unit testing thing. We need both.

AdamISZ avatar Apr 08 '22 12:04 AdamISZ

It looks there are 2000 free CI/CD minutes, so don't think there is a problem with this change (testing with oldest supported and most recent Bitcoin Core and supported Python versions).

image

kristapsk avatar Jul 27 '22 20:07 kristapsk

Updated actions/cache from v2 to v3.

kristapsk avatar Oct 23 '22 21:10 kristapsk

Updated Bitcoin Core from 22.0 to 23.0.

We could also add macos-latest in addition to ubuntu-latest, with some small changes. I recently did that for my bitcoin-scripts project. See https://github.com/kristapsk/bitcoin-scripts/commit/2eedf0a675383073a5ad01e6e0bbf5b8f5d1851e.

kristapsk avatar Oct 27 '22 13:10 kristapsk

Rebased on current master, to include update to pytest 6.2.5.

kristapsk avatar Nov 05 '22 13:11 kristapsk

Rebased and changed newest tested Core version to 24.0.1.

kristapsk avatar Dec 16 '22 12:12 kristapsk

Rebased

kristapsk avatar Dec 27 '22 18:12 kristapsk

Rebased and updated bitcoind from 24.0.1 to 25.0.

kristapsk avatar Jun 03 '23 13:06 kristapsk

@kristapsk I guess you are waiting for an ACK on this, only? I would leave this to your discretion, if you think it is a net positive for the CI, then please go ahead. I see nothing wrong in the script,so:

ACK https://github.com/JoinMarket-Org/joinmarket-clientserver/commit/c92120619e48ac79708b020bd702fe1441090017

AdamISZ avatar Aug 07 '23 18:08 AdamISZ

@kristapsk I guess you are waiting for an ACK on this, only? I would leave this to your discretion, if you think it is a net positive for the CI, then please go ahead. I see nothing wrong in the script,so:

ACK c921206

Yes, was waiting for a Concept ACK, don't see downsides here.

kristapsk avatar Aug 07 '23 20:08 kristapsk