Web3Swift icon indicating copy to clipboard operation
Web3Swift copied to clipboard

All-Tests scheme doesn't launch ganache automatically

Open abdulowork opened this issue 7 years ago • 4 comments

Ganache and any other necessary dependencies should be launched as a part of the All-Tests scheme.

abdulowork avatar Nov 26 '18 12:11 abdulowork

@biboran how we should implement this? With XCode project configuration?

rockfridrich avatar Nov 27 '18 14:11 rockfridrich

@rockfridrich maybe that's the solution. We can also try launching tests and ganache in a master process.

abdulowork avatar Dec 07 '18 13:12 abdulowork

You can just add ganache launch as a script in the build phase (for some reason it wouldn't launch as a pre-action):

exec -a ganache yarn run ganache-cli --account="0x1636e10756e62baabddd4364010444205f1216bdb1644ff8f776f6e2982aa9f5,1000000000000000000" --account="0x159b7c413354adec1bd31caaf7e4fde71e9132a5b29193d2f6181de777745493,1000000000000000000" --account="0x4836d1e4785f62498ec6a7a61ff0d01e3fa97dba863a76f5a6c3ace47f62be3f,100000000000000000000" --gasPrice="20000000000" --networkId="1" > /dev/null 2>&1 &

and in the post-actions you can do:

pkill -f ganache

abdulowork avatar Feb 20 '19 07:02 abdulowork

This looks like a great approach. Let's use it. It will make tests easier. Will it affect Travis? Probably script should look like

yarn install && ...

To fetch dependencies if needed

rockfridrich avatar Feb 21 '19 21:02 rockfridrich