Skip to content
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
15 changes: 14 additions & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@ jobs:
- run: ./tools/ci/ethereum_test
- store_artifacts:
path: ./integration/cypress/screenshots
- store_artifacts:
path: ./integration/logs
parity-postgres:
resource_class: xlarge
docker:
Expand Down Expand Up @@ -177,6 +179,8 @@ jobs:
- run: ./tools/ci/ethereum_test parity
- store_artifacts:
path: ./integration/cypress/screenshots
- store_artifacts:
path: ./integration/logs
truffle:
docker:
- image: smartcontract/builder:1.0.25
Expand All @@ -194,6 +198,8 @@ jobs:
- /usr/local/share/.cache/yarn
- run: pip3 install -r requirements.txt
- run: ./tools/ci/truffle_test
- store_artifacts:
path: ./integration/logs
json-api-client:
docker:
- image: smartcontract/builder:1.0.25
Expand All @@ -210,6 +216,8 @@ jobs:
paths:
- /usr/local/share/.cache/yarn
- run: yarn workspace @chainlink/json-api-client
- store_artifacts:
path: ./integration/logs
operator-ui:
docker:
- image: smartcontract/builder:1.0.25
Expand All @@ -227,6 +235,8 @@ jobs:
- /usr/local/share/.cache/yarn
- run: ./tools/ci/init_gcloud
- run: ./tools/ci/operator_ui_test
- store_artifacts:
path: ./integration/logs
explorer:
working_directory: ~/chainlink
docker:
Expand Down Expand Up @@ -266,6 +276,8 @@ jobs:
- run:
name: Run E2E Tests
command: yarn workspace @chainlink/explorer-client run build && yarn workspace @chainlink/explorer run test-ci:e2e:silent
- store_artifacts:
path: ./integration/logs
forks:
machine:
image: ubuntu-1604:201903-01
Expand All @@ -277,7 +289,8 @@ jobs:
name: Install Yarn
command: npm install -g yarn
- run: ./tools/ci/forks_test

- store_artifacts:
path: ./integration/logs
build-publish-explorer:
machine: true
steps:
Expand Down
34 changes: 17 additions & 17 deletions integration/common
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ launch_gethnet() {
printf -- "[\033[31mstopped\033[0m]\n"

title "Starting geth..."
$SRCROOT/tools/bin/gethnet &>$SRCROOT/integration/gethnet.log &
$SRCROOT/tools/bin/gethnet &>$SRCROOT/integration/logs/gethnet.log &
waitForResponse $ETH_HTTP_URL
title "Geth is running."
}
Expand All @@ -57,7 +57,7 @@ launch_parity() {
printf -- "[\033[31mstopped\033[0m]\n"

title "Starting parity..."
$SRCROOT/tools/bin/devnet &>$SRCROOT/integration/devnet.log &
$SRCROOT/tools/bin/devnet &>$SRCROOT/integration/logs/devnet.log &
waitForResponse $ETH_HTTP_URL
title "Parity is running."
}
Expand All @@ -68,7 +68,7 @@ install_chainlink() {
fi

title "Making chainlink..."
make install &>$SRCROOT/integration/make.log
make install &>$SRCROOT/integration/logs/make.log
}

launch_chainlink() {
Expand All @@ -88,15 +88,15 @@ launch_chainlink() {
trap "rm -rf $clroot" EXIT HUP TERM INT
cp $SRCROOT/tools/clroot/{password.txt,apicredentials} $clroot/
echo running chainlink from ${clroot}
chainlink node start -d -p $clroot/password.txt -a $clroot/apicredentials &>$SRCROOT/integration/chainlink.log &
chainlink node start -d -p $clroot/password.txt -a $clroot/apicredentials &>$SRCROOT/integration/logs/chainlink.log &

waitForResponse $chainlink_url
title "Chainlink is running."

waitFor "grep 'Unlocked account' '$SRCROOT/integration/chainlink.log'" 10
export CHAINLINK_NODE_ADDRESS=`cat $SRCROOT/integration/chainlink.log | grep 'Unlocked account' | awk '{print$5}'`
waitFor "grep 'Unlocked account' '$SRCROOT/integration/logs/chainlink.log'" 10
export CHAINLINK_NODE_ADDRESS=`cat $SRCROOT/integration/logs/chainlink.log | grep 'Unlocked account' | awk '{print$5}'`

yarn workspace @chainlink/integration-scripts fund-address > $SRCROOT/integration/fund_address.log
yarn workspace @chainlink/integration-scripts fund-address > $SRCROOT/integration/logs/fund_address.log
}

explorer_url="http://127.0.0.1:8080"
Expand All @@ -110,8 +110,8 @@ launch_explorer() {
printf -- "[\033[31mstopped\033[0m]\n"
title "Starting explorer..."

yarn workspace @chainlink/explorer run build &>$SRCROOT/integration/explorer-yarn.log
yarn workspace @chainlink/explorer run prod &>$SRCROOT/integration/explorer.log & waitForResponse $explorer_url
yarn workspace @chainlink/explorer run build &>$SRCROOT/integration/logs/explorer-yarn.log
yarn workspace @chainlink/explorer run prod &>$SRCROOT/integration/logs/explorer.log & waitForResponse $explorer_url
title "Explorer is running."
}

Expand All @@ -128,7 +128,7 @@ add_clnode_to_explorer() {
}

setup_scripts() {
yarn --no-progress install &>$SRCROOT/integration/yarn.log
yarn --no-progress install &>$SRCROOT/integration/logs/yarn.log
yarn workspace chainlinkv0.5 build
yarn workspace chainlink build
yarn workspace @chainlink/integration-scripts setup
Expand All @@ -139,18 +139,18 @@ deploy_contracts() {
pushd integration >/dev/null

# run migrations
yarn workspace @chainlink/integration-scripts deploy-contracts | tee $SRCROOT/integration/deploy.log
export LINK_TOKEN_ADDRESS=`cat $SRCROOT/integration/deploy.log | grep 'Deployed LinkToken at:' | awk '{print$4}'`
export ORACLE_CONTRACT_ADDRESS=`cat $SRCROOT/integration/deploy.log | grep 'Deployed Oracle at:' | awk '{print$4}'`
export ETH_LOG_ADDRESS=`cat $SRCROOT/integration/deploy.log | grep 'Deployed EthLog at:' | awk '{print$4}'`
export RUN_LOG_ADDRESS=`cat $SRCROOT/integration/deploy.log | grep 'Deployed RunLog at:' | awk '{print$4}'`
yarn workspace @chainlink/integration-scripts deploy-contracts | tee $SRCROOT/integration/logs/deploy.log
export LINK_TOKEN_ADDRESS=`cat $SRCROOT/integration/logs/deploy.log | grep 'Deployed LinkToken at:' | awk '{print$4}'`
export ORACLE_CONTRACT_ADDRESS=`cat $SRCROOT/integration/logs/deploy.log | grep 'Deployed Oracle at:' | awk '{print$4}'`
export ETH_LOG_ADDRESS=`cat $SRCROOT/integration/logs/deploy.log | grep 'Deployed EthLog at:' | awk '{print$4}'`
export RUN_LOG_ADDRESS=`cat $SRCROOT/integration/logs/deploy.log | grep 'Deployed RunLog at:' | awk '{print$4}'`

echo "RunLog address: $RUN_LOG_ADDRESS"
popd >/dev/null
title "Migration complete."
}
deploy_v05_contracts() {
log_path=$SRCROOT/integration/initiate-service-agreement.log
log_path=$SRCROOT/integration/logs/initiate-service-agreement.log
yarn workspace @chainlink/integration-scripts deploy-v0.5-contracts | tee $log_path
export LINK_TOKEN_ADDRESS=`cat $log_path | grep 'Deployed LinkToken at:' | awk '{print$4}'`
export COORDINATOR_ADDRESS=`cat $log_path | grep 'Deployed Coordinator at:' | awk '{print$4}'`
Expand All @@ -167,7 +167,7 @@ launch_echo_server() {
title "Starting echo server..."
pushd integration >/dev/null

yarn workspace @chainlink/integration-scripts start-echo-server "$ECHO_SERVER_PORT" &>$SRCROOT/integration/echo-server.log &
yarn workspace @chainlink/integration-scripts start-echo-server "$ECHO_SERVER_PORT" &>$SRCROOT/integration/logs/echo-server.log &
waitForResponse $ECHO_SERVER_URL

popd >/dev/null
Expand Down
Empty file added integration/logs/.gitkeep
Empty file.
6 changes: 3 additions & 3 deletions integration/runlog_test
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fi
expected_echo_count=$(expr $(curl -sS "$ECHO_SERVER_URL") + 1)
expected_job_count=$(expr $(chainlink -j jobs list | jq length) + 1)

yarn workspace @chainlink/integration-scripts send-runlog-transaction | tee $SRCROOT/integration/send_runlog_transaction.log
yarn workspace @chainlink/integration-scripts send-runlog-transaction | tee $SRCROOT/integration/logs/send_runlog_transaction.log

# Check echo count
assert "Echo count" "curl -sS $ECHO_SERVER_URL" $expected_echo_count
Expand All @@ -35,7 +35,7 @@ tx_receiver=$(chainlink -j runs list --jobid $jid | jq '.[].result.data.address'
echo "Test sent TX to: $tx_receiver"

# Check for the Fullfillment event
yarn workspace @chainlink/integration-scripts count-transaction-events | tee $SRCROOT/integration/send_runlog_transaction.log
tx_event_count=`cat $SRCROOT/integration/send_runlog_transaction.log | grep "Events from $RUN_LOG_ADDRESS in $txid:" | awk '{print$6}'`
yarn workspace @chainlink/integration-scripts count-transaction-events | tee $SRCROOT/integration/logs/send_runlog_transaction.log
tx_event_count=`cat $SRCROOT/integration/logs/send_runlog_transaction.log | grep "Events from $RUN_LOG_ADDRESS in $txid:" | awk '{print$6}'`
assert "Transaction Events" "echo $tx_event_count" 2

2 changes: 1 addition & 1 deletion tools/ci/ethereum_test
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ title 'End to end tests.'
launch_cypress_job_server

set -o pipefail
yarn workspace @chainlink/integration test:cypress | tee $SRCROOT/integration/e2e.tests.log
yarn workspace @chainlink/integration test:cypress | tee $SRCROOT/integration/logs/e2e.tests.log
set +o pipefail

title 'All tests passed.'
Expand Down