Fix solc-nightly job (#1732)

* update truffle to 5.0.14

* fix setup to test with solc-nightly

* switch to npx in script/test.sh

* please the linter

* rename build to prepack

* move download of nightly build to a compile script

* make compile script executable
This commit is contained in:
Francisco Giordano
2019-05-02 14:58:07 -03:00
committed by Nicolás Venturo
parent af55a843e3
commit 9646cc951f
6 changed files with 34 additions and 127 deletions

7
scripts/compile.sh Executable file
View File

@ -0,0 +1,7 @@
#!/usr/bin/env sh
if [ "$SOLC_NIGHTLY" = true ]; then
docker pull ethereum/solc:nightly
fi
truffle compile

View File

@ -39,9 +39,9 @@ start_ganache() {
)
if [ "$SOLIDITY_COVERAGE" = true ]; then
node_modules/.bin/ganache-cli-coverage --emitFreeLogs true --allowUnlimitedContractSize true --gasLimit 0xfffffffffff --port "$ganache_port" "${accounts[@]}" > /dev/null &
npx ganache-cli-coverage --emitFreeLogs true --allowUnlimitedContractSize true --gasLimit 0xfffffffffff --port "$ganache_port" "${accounts[@]}" > /dev/null &
else
node_modules/.bin/ganache-cli --gasLimit 0xfffffffffff --port "$ganache_port" "${accounts[@]}" > /dev/null &
npx ganache-cli --gasLimit 0xfffffffffff --port "$ganache_port" "${accounts[@]}" > /dev/null &
fi
ganache_pid=$!
@ -62,19 +62,14 @@ else
start_ganache
fi
if [ "$SOLC_NIGHTLY" = true ]; then
echo "Downloading solc nightly"
wget -q https://raw.githubusercontent.com/ethereum/solc-bin/gh-pages/bin/soljson-nightly.js -O /tmp/soljson.js && find . -name soljson.js -exec cp /tmp/soljson.js {} \;
fi
truffle version
npx truffle version
if [ "$SOLIDITY_COVERAGE" = true ]; then
node_modules/.bin/solidity-coverage
npx solidity-coverage
if [ "$CONTINUOUS_INTEGRATION" = true ]; then
cat coverage/lcov.info | node_modules/.bin/coveralls
cat coverage/lcov.info | npx coveralls
fi
else
node_modules/.bin/truffle test "$@"
npx truffle test "$@"
fi