forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable geth integration tests (ethereum#246)
- Loading branch information
Showing
2 changed files
with
101 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,9 @@ | ||
version: 2 | ||
jobs: | ||
|
||
code_checkout: | ||
code-checkout: | ||
docker: | ||
- image: circleci/golang:1.11 | ||
|
||
steps: | ||
- checkout | ||
- attach_workspace: | ||
|
@@ -16,9 +15,7 @@ jobs: | |
lint: | ||
docker: | ||
- image: circleci/golang:1.11 | ||
|
||
working_directory: /go/src/github.com/celo-org/geth | ||
|
||
steps: | ||
- attach_workspace: | ||
at: ~/geth | ||
|
@@ -31,7 +28,6 @@ jobs: | |
unit-tests-no-coverage: | ||
docker: | ||
- image: circleci/golang:1.11 | ||
|
||
working_directory: /go/src/github.com/celo-org/geth | ||
steps: | ||
- attach_workspace: | ||
|
@@ -47,7 +43,6 @@ jobs: | |
unit-tests-with-coverage: | ||
docker: | ||
- image: circleci/golang:1.11 | ||
|
||
working_directory: /go/src/github.com/celo-org/geth | ||
steps: | ||
- attach_workspace: | ||
|
@@ -61,47 +56,118 @@ jobs: | |
# We already are running all the tests, so, if they fail, we still fail. | ||
build/env.sh go run build/ci.go test -coverage && bash <(curl -s https://codecov.io/bash) || true | ||
end-to-end-tests: | ||
celo-monorepo-checkout: | ||
docker: | ||
- image: circleci/golang:1.11 | ||
|
||
working_directory: /go/src/github.com/celo-org/geth | ||
- image: celohq/node8:gcloud | ||
steps: | ||
- attach_workspace: | ||
at: ~/geth | ||
- run: | ||
name: End to end test | ||
name: Setup Go language | ||
command: | | ||
set -euo pipefail | ||
GO_LANG_DIR="./golang" | ||
mkdir -p ${GO_LANG_DIR} | ||
wget https://dl.google.com/go/go1.11.5.linux-amd64.tar.gz | ||
tar xf go1.11.5.linux-amd64.tar.gz -C ${GO_LANG_DIR} | ||
${GO_LANG_DIR}/go/bin/go version | ||
- run: | ||
name: Setup celo-monorepo | ||
command: | | ||
set -euo pipefail | ||
# Use -p since it does not fail if the dir exists. It fails if the directory does not exist and | ||
# it fails to create the directory though. | ||
set -euo pipefail | ||
cd ~/geth | ||
mkdir -p ~/.ssh/ | ||
echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config | ||
export CELO_MONOREPO_DIR="/tmp/celo" | ||
git clone --depth 1 [email protected]:celo-org/celo-monorepo.git ${CELO_MONOREPO_DIR} | ||
export CELO_MONOREPO_DIR="./celo-monorepo" | ||
git clone --depth 1 https://${GH_AUTH_USERNAME}:${GH_AUTH_TOKEN}@github.com/celo-org/celo-monorepo.git ${CELO_MONOREPO_DIR} | ||
# Change these paths to use https login since the SSH key does not have access to these repositories. | ||
# These environment variables are configured atssh -p 64535 34.230.3.71 https://circleci.com/gh/celo-org/geth/edit#env-vars | ||
sed -i "s#git+ssh#git+https#" ${CELO_MONOREPO_DIR}/packages/protocol/package.json | ||
sed -i "s#[email protected]:#${GH_AUTH_USERNAME}:${GH_AUTH_TOKEN}@github.com/#" ${CELO_MONOREPO_DIR}/packages/protocol/package.json | ||
sed -i "s#[email protected]/#${GH_AUTH_USERNAME}:${GH_AUTH_TOKEN}@github.com/#" ${CELO_MONOREPO_DIR}/packages/protocol/package.json | ||
cd ${CELO_MONOREPO_DIR}/packages/celotool | ||
yarn | ||
./ci_test_transactions.sh local ${GETH_DIR} | ||
./ci_test_sync.sh local ${GETH_DIR} | ||
- persist_to_workspace: | ||
root: . | ||
paths: . | ||
|
||
end-to-end-transfer-test: | ||
docker: | ||
- image: celohq/node8:gcloud | ||
steps: | ||
- attach_workspace: | ||
at: ~/geth | ||
- run: | ||
name: Geth transfer test | ||
no_output_timeout: 900 | ||
command: | | ||
GO_LANG_DIR="$HOME/geth/golang" | ||
${GO_LANG_DIR}/go/bin/go version | ||
export PATH=${PATH}:${GO_LANG_DIR}/go/bin | ||
export CELO_MONOREPO_DIR="$HOME/geth/celo-monorepo" | ||
cd ${CELO_MONOREPO_DIR}/packages/celotool | ||
./ci_test_transfers.sh local ~/geth | ||
end-to-end-sync-test: | ||
docker: | ||
- image: celohq/node8:gcloud | ||
steps: | ||
- attach_workspace: | ||
at: ~/geth | ||
- run: | ||
name: Geth sync with a standalone node test | ||
command: | | ||
GO_LANG_DIR="$HOME/geth/golang" | ||
${GO_LANG_DIR}/go/bin/go version | ||
export PATH=${PATH}:${GO_LANG_DIR}/go/bin | ||
export CELO_MONOREPO_DIR="$HOME/geth/celo-monorepo" | ||
cd ${CELO_MONOREPO_DIR}/packages/celotool | ||
./ci_test_sync.sh local ~/geth | ||
end-to-end-sync-integration-test: | ||
docker: | ||
- image: celohq/node8:gcloud | ||
steps: | ||
- attach_workspace: | ||
at: ~/geth | ||
- run: | ||
name: Geth sync with integration network(s) test | ||
command: | | ||
GO_LANG_DIR="$HOME/geth/golang" | ||
${GO_LANG_DIR}/go/bin/go version | ||
export PATH=${PATH}:${GO_LANG_DIR}/go/bin | ||
export CELO_MONOREPO_DIR="$HOME/geth/celo-monorepo" | ||
cd ${CELO_MONOREPO_DIR}/packages/celotool | ||
./ci_test_integration_sync.sh local ~/geth | ||
workflows: | ||
version: 2 | ||
build: | ||
jobs: | ||
- code_checkout | ||
- code-checkout | ||
- lint: | ||
requires: | ||
- code_checkout | ||
- code-checkout | ||
- unit-tests-no-coverage: | ||
requires: | ||
- code_checkout | ||
- code-checkout | ||
- unit-tests-with-coverage: | ||
requires: | ||
- code_checkout | ||
# Disabled for now, since it is failing due to lack of access to celo-monorepo | ||
# https://circleci.com/gh/celo-org/geth/1087 | ||
# - end-to-end-tests: | ||
# requires: | ||
# - code_checkout | ||
- code-checkout | ||
- celo-monorepo-checkout: | ||
requires: | ||
- code-checkout | ||
- end-to-end-transfer-test: | ||
requires: | ||
- code-checkout | ||
- celo-monorepo-checkout | ||
- end-to-end-sync-test: | ||
requires: | ||
- code-checkout | ||
- celo-monorepo-checkout | ||
- end-to-end-sync-integration-test: | ||
requires: | ||
- code-checkout | ||
- celo-monorepo-checkout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters