-
Notifications
You must be signed in to change notification settings - Fork 15
Conversation
.github/workflows/test.yml
Outdated
# To run CI against unrelased go-ipfs or js-ipfs-* code (eg. wip PR), | ||
# uncomment below and define git revisions in ./scripts/custom-runtime.sh | ||
#IPFS_GO_EXEC: /tmp/go-ipfs/cmd/ipfs/ipfs | ||
#IPFS_JS_EXEC: /tmp/js-ipfs/packages/ipfs/src/cli.js | ||
#IPFS_JS_MODULE: /tmp/js-ipfs/packages/ipfs/dist/cjs/src/index.js | ||
#IPFS_JS_HTTP_MODULE: /tmp/js-ipfs/packages/ipfs-http-client/dist/cjs/src/index.js |
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 works and is documented ✔️
What's the advantage of doing this vs always testing against custom-runtime.sh, but sometimes checking out the release tag/branch and other times checking out a Git hash? We could pass two versions into the script (e.g. custom-runtime.sh v0.10.0 v0.60.0
) and then have the script export environment variables.
Perhaps this is a pain and could be circumventing by passing the variables into the interop test. If so this seems like a fine change to make at a later date.
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.
The problem with custom-runtime.sh
is that (as it is right now) builds dependencies from scratch, which takes ~6min.
This would slow down CI in go-ipfs and js-ipfs repos where ipfs/interop also runs.
We can make it smarter, but for now i just wanted to ship mvp so the next person has head-start and does not need to figure out lerna stuff for JS.
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.
SGTM, thanks. I forgot how long the js-ipfs builds can take.
e2f5aed
to
7266139
Compare
This extracts glue code that simplifies running interop against unreleased code of go-ipfs and js-ipfs packages from lerna monorepo. Makes it easier to demonstrate green CI and/or test end-to-end locally before submitting a PR.
7266139
to
f62da35
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.
I still have questions for if/how we could do this differently. However, this does the job, thank you 🙇
This PR extracts the glue code from #387 that simplifies running interop against unreleased code of go-ipfs and js-ipfs packages from lerna monorepo.
Goal here is to make it easier to land changes by demonstrating green CI and/or speed up local dev.
DEMO
See it in action in #387 where it takes care of running against specific git revisions of go-ipfs, js-ipfs(-http-server) and js-ipfs-http-client 🤖
(next) I am going to use this for unblocking libp2p as well.