Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Travis ci cron jobs #286

Merged
merged 6 commits into from
Sep 28, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .solcover.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module.exports = {
norpc: true,
port: 8545,
copyPackages: ['openzeppelin-solidity'],
testCommand: 'node ../node_modules/.bin/truffle test `find test/*.js ! -name a_poly_oracle.js` --network coverage',
testCommand: 'node ../node_modules/.bin/truffle test `find test/*.js ! -name a_poly_oracle.js -and ! -name s_v130_to_v140_upgrade.js` --network coverage',
deepSkip: true,
skipFiles: ['external', 'flat']
};
31 changes: 21 additions & 10 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -72,19 +72,25 @@ start_testrpc() {

if testrpc_running; then
echo "Using existing testrpc instance"
bridge_running
if bridge_running; then
echo "Using existing ethereum-bridge instance"
else
echo "Runnning the new ethereum-bridge instance"
start_bridge
# Do not start ethereum bridge unless it is a cron job from travis
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
bridge_running
if bridge_running; then
echo "Using existing ethereum-bridge instance"
else
echo "Runnning the new ethereum-bridge instance"
start_bridge
fi
fi
else
echo "Starting our own testrpc instance"
start_testrpc
echo "Starting our own ethereum-bridge instance"
sleep 10
start_bridge
# Do not start ethereum bridge unless it is a cron job from travis
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
echo "Starting our own ethereum-bridge instance"
sleep 10
start_bridge
fi
fi

if ! [ -z "${TRAVIS_PULL_REQUEST+x}" ] && [ "$TRAVIS_PULL_REQUEST" != false ]; then
Expand All @@ -94,5 +100,10 @@ if ! [ -z "${TRAVIS_PULL_REQUEST+x}" ] && [ "$TRAVIS_PULL_REQUEST" != false ]; t
cat coverage/lcov.info | node_modules/.bin/coveralls
fi
else
node_modules/.bin/truffle test `ls test/*.js`
# Do not run a_poly_oracle,js tests unless it is a cron job from travis
if [ "$TRAVIS_EVENT_TYPE" = "cron" ]; then
node_modules/.bin/truffle test `ls test/*.js`
else
node_modules/.bin/truffle test `find test/*.js ! -name a_poly_oracle.js -and ! -name s_v130_to_v140_upgrade.js`
fi
fi