I'm trying to write a .travis.yml file to test my ethereum contract.
In order to test it, I need to start up an instance of the ganache-cli ethereum client by calling
ganache-cli -p 7545
and then run some truffle commands:
truffle compile truffle migrate
However, if I put the ganache-cli command in the script section of my .travis.yml file like so:
script: - ganache-cli -p 7545 - truffle migrate - truffle test
My truffle commands are never called because the entire terminal instance is taken over by the instance of the ganache-cli client that is started up.
I've tried putting the ganache-cli call in before-scripts like so:
before-script: - ganache-cli -p 7545 script: - truffle compile - truffle migrate --network development - truffle test
Using the above code, the ethereum client is never started. Does anyone have any idea how to setup my .travis.yml file to both start the ganache-cli client as well as allow me to call my truffle migrate/test commands?