Skip to content

Commit c07026c

Browse files
authored
Integrating Matchstick rust binary as a runnable command in the CLI (#731)
* undo change * made it work with binary so it's time to test importing it * a couple of changes for testing purposes * changing name of js file * undo change * new version of raw binary * Rename func to match existing one * adding debug log to see what toolbox contains * now sending the param to the inner function * changed version of dependency * trying to use await * updated binary install version * changed binary install version * updated binary version again * updating version * updating version again * version * version update * not sending arguments * update version * added options for version and force * trying to remove return statement * deleting unnecessary code * a bit of code cleanup * added the contents of the old test file to another file * updating yarn lock files * switched xmlhttp with fetch * fixed runtime error * added debugging log * changed test text to local * removed redundant dependency * updated travis yml and readme and added logs for os debugging * added if conditions for different versions of the same os * intentionally add mistake in travis yml to see if build still fails because of glibc version * added a debug log to catch the release substr problem * small script improvement * hardcoded the expected return binary temporarily because os.release returns gcp version and not ubuntu version * removed hardcoded values and fixed travis yml * made the command work on other linux dists as well * added a small optimization in the if conditions to include VM support * updated yarn lock file * copy pasted yarn lock file from graph cli * added new line at end of file to make files identical * deleted empty spaces * updating lock files
1 parent 7f9b71c commit c07026c

File tree

6 files changed

+643
-499
lines changed

6 files changed

+643
-499
lines changed

.travis.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ script:
2626
- yarn
2727
- ../../bin/graph codegen --debug
2828
- ../../bin/graph build --debug
29-
# Exercise `graph test` with another example subgraph
30-
- cd ../../examples/basic-event-handlers
29+
# Exercise `graph local` with another example subgraph
30+
- cd ../basic-event-handlers
3131
- yarn
32-
- ../../bin/graph test "yarn test"
32+
- ../../bin/graph local "yarn test"
3333
# Run `graph auth` inside `dbus-launch` to be able to access gnome-keyring
3434
# secrets via keytar
3535
# - dbus-launch bash -c '../../bin/graph auth http://some-node-ip.org test-access-token'

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ As of today, the command line interface supports the following commands:
1414
- `graph build` — Compiles a subgraph to WebAssembly.
1515
- `graph deploy` — Deploys a subgraph to a [Graph Node](https://github.com/graphprotocol/graph-node).
1616
- `graph auth` — Stores a [Graph Node](https://github.com/graphprotocol/graph-node) access token in the system's keychain.
17-
- `graph test` — Runs tests against a [Graph Node](https://github.com/graphprotocol/graph-node) test environment (using Ganache by default).
17+
- `graph local` — Runs tests against a [Graph Node](https://github.com/graphprotocol/graph-node) test environment (using Ganache by default).
18+
- `graph test` — Downloads and runs the [Matchstick](https://github.com/LimeChain/matchstick) rust binary in order to test a subgraph.
1819

1920
## How It Works
2021

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
"description": "CLI for building for and deploying to The Graph",
55
"dependencies": {
66
"assemblyscript": "0.19.10",
7+
"binary-install-raw": "0.0.13",
78
"chalk": "^3.0.0",
89
"chokidar": "^3.0.2",
910
"debug": "^4.1.1",

0 commit comments

Comments
 (0)