From 4f3786ca4bbd01e4dcb201d238dda96b4d4135cd Mon Sep 17 00:00:00 2001 From: Lukasz Zimnoch Date: Mon, 20 Jul 2020 14:26:04 +0200 Subject: [PATCH 1/5] CircleCI config for E2E tests execution --- .circleci/config.yml | 79 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..fb910c2 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,79 @@ +version: 2.1 + +workflows: + version: 2 + end-to-end-tests: + jobs: + - run-end-to-end-tests: + filters: + branches: + only: + - local-setup-ci + +jobs: + run-end-to-end-tests: + machine: + image: ubuntu-1604:201903-01 + docker_layer_caching: true + working_directory: ~/local-setup + shell: /bin/bash -eo pipefail -l + steps: + - checkout + - run: + name: Install common tools + command: cd ~ && ./local-setup/deployments/local-setup-environment/provisioning/install-commons.sh + - run: + name: Install Node.js and NPM + command: | + nvm install 14.3.0 + nvm install 11.15.0 + nvm alias default 11.15.0 + nvm use default + echo "Using node: $(node -v)" + - run: + name: Install Go + command: | + cd ~ + sudo rm -rf /usr/local/go + ./local-setup/deployments/local-setup-environment/provisioning/install-go.sh + echo "Using Go: $(go version)" + - run: + name: Install Geth + command: cd ~ && ./local-setup/deployments/local-setup-environment/provisioning/install-geth.sh + - run: + name: Install Solidity + command: cd ~ && ./local-setup/deployments/local-setup-environment/provisioning/install-solidity.sh + - run: + name: Install Protobuf + command: cd ~ && ./local-setup/deployments/local-setup-environment/provisioning/install-protobuf.sh + - run: + name: Install Truffle + command: | + cd ~ + echo "Using node: $(node -v)" + ./local-setup/deployments/local-setup-environment/provisioning/install-truffle.sh + - run: + name: Update submodules + command: cd ~ && ./local-setup/deployments/local-setup-instance/provisioning/update-repository.sh + - run: + name: Initialize and run Geth + command: | + cd ~ + ./local-setup/deployments/local-setup-instance/provisioning/initialize-geth.sh + ./local-setup/deployments/local-setup-instance/provisioning/run-geth.sh + - run: + name: Run Bitcoin Core and ElectrumX + command: cd ~ && ./local-setup/deployments/local-setup-instance/provisioning/run-bitcoin.sh + - run: + name: Run install script + command: cd ~ && ./local-setup/deployments/local-setup-instance/provisioning/run-install.sh + - run: + name: Run Core and ECDSA clients + command: cd ~ && ./local-setup/deployments/local-setup-instance/provisioning/run-clients.sh + - run: + name: Run E2E test scripts + command: | + nvm use 14.3.0 + echo "Using node: $(node -v)" + ./run-e2e-test.sh + From 765d8cc42bb6181ba83d78791d8ac1a7f3445449 Mon Sep 17 00:00:00 2001 From: Lukasz Zimnoch Date: Mon, 20 Jul 2020 14:29:18 +0200 Subject: [PATCH 2/5] Remove update submodules step --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fb910c2..69d66c5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -52,9 +52,6 @@ jobs: cd ~ echo "Using node: $(node -v)" ./local-setup/deployments/local-setup-environment/provisioning/install-truffle.sh - - run: - name: Update submodules - command: cd ~ && ./local-setup/deployments/local-setup-instance/provisioning/update-repository.sh - run: name: Initialize and run Geth command: | From e2f4424e44726191f1cd8e5002aee9c9783f3d3f Mon Sep 17 00:00:00 2001 From: Lukasz Zimnoch Date: Mon, 20 Jul 2020 17:37:57 +0200 Subject: [PATCH 3/5] Setup nightly e2e test trigger --- .circleci/config.yml | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 69d66c5..710859f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -2,16 +2,19 @@ version: 2.1 workflows: version: 2 - end-to-end-tests: - jobs: - - run-end-to-end-tests: + nightly-e2e-tests: + triggers: + - schedule: + cron: "0 0 * * *" filters: branches: only: - - local-setup-ci + - local-setup-ci #TODO: change to master + jobs: + - run-e2e-tests jobs: - run-end-to-end-tests: + run-e2e-tests: machine: image: ubuntu-1604:201903-01 docker_layer_caching: true From 6aa61b9cde415523dee65d91cc9ebf6f457f1fc5 Mon Sep 17 00:00:00 2001 From: Lukasz Zimnoch Date: Tue, 21 Jul 2020 11:33:24 +0200 Subject: [PATCH 4/5] Use better machine and increase timeout for last step --- .circleci/config.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 710859f..0fcb132 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,6 +18,7 @@ jobs: machine: image: ubuntu-1604:201903-01 docker_layer_caching: true + resource_class: large working_directory: ~/local-setup shell: /bin/bash -eo pipefail -l steps: @@ -72,6 +73,7 @@ jobs: command: cd ~ && ./local-setup/deployments/local-setup-instance/provisioning/run-clients.sh - run: name: Run E2E test scripts + no_output_timeout: 30m command: | nvm use 14.3.0 echo "Using node: $(node -v)" From 6559117fc0402e2d98cb33e5d146b17eee12f3e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Zimnoch?= Date: Fri, 24 Jul 2020 15:54:05 +0200 Subject: [PATCH 5/5] Change workflow filter to master --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 0fcb132..8977515 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,7 +9,7 @@ workflows: filters: branches: only: - - local-setup-ci #TODO: change to master + - master jobs: - run-e2e-tests